Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B

Percentage Accurate: 85.0% → 98.3%
Time: 8.8s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 85.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}

Alternative 1: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot \frac{z - t}{a - t} + x \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ (* y (/ (- z t) (- a t))) x))
double code(double x, double y, double z, double t, double a) {
	return (y * ((z - t) / (a - t))) + x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = (y * ((z - t) / (a - t))) + x
end function
public static double code(double x, double y, double z, double t, double a) {
	return (y * ((z - t) / (a - t))) + x;
}
def code(x, y, z, t, a):
	return (y * ((z - t) / (a - t))) + x
function code(x, y, z, t, a)
	return Float64(Float64(y * Float64(Float64(z - t) / Float64(a - t))) + x)
end
function tmp = code(x, y, z, t, a)
	tmp = (y * ((z - t) / (a - t))) + x;
end
code[x_, y_, z_, t_, a_] := N[(N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
y \cdot \frac{z - t}{a - t} + x
\end{array}
Derivation
  1. Initial program 86.7%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative86.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
    2. associate-*r/99.2%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} + x \]
    3. fma-def99.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
  3. Simplified99.2%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
  4. Step-by-step derivation
    1. fma-udef99.2%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
  5. Applied egg-rr99.2%

    \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
  6. Final simplification99.2%

    \[\leadsto y \cdot \frac{z - t}{a - t} + x \]

Alternative 2: 75.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-73}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-92}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-25}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 34:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -4.5e-73)
   (+ y x)
   (if (<= t 4.9e-92)
     (+ x (* y (/ z a)))
     (if (<= t 7e-25)
       (- x (* z (/ y t)))
       (if (<= t 34.0) (+ x (/ z (/ a y))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.5e-73) {
		tmp = y + x;
	} else if (t <= 4.9e-92) {
		tmp = x + (y * (z / a));
	} else if (t <= 7e-25) {
		tmp = x - (z * (y / t));
	} else if (t <= 34.0) {
		tmp = x + (z / (a / y));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-4.5d-73)) then
        tmp = y + x
    else if (t <= 4.9d-92) then
        tmp = x + (y * (z / a))
    else if (t <= 7d-25) then
        tmp = x - (z * (y / t))
    else if (t <= 34.0d0) then
        tmp = x + (z / (a / y))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.5e-73) {
		tmp = y + x;
	} else if (t <= 4.9e-92) {
		tmp = x + (y * (z / a));
	} else if (t <= 7e-25) {
		tmp = x - (z * (y / t));
	} else if (t <= 34.0) {
		tmp = x + (z / (a / y));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -4.5e-73:
		tmp = y + x
	elif t <= 4.9e-92:
		tmp = x + (y * (z / a))
	elif t <= 7e-25:
		tmp = x - (z * (y / t))
	elif t <= 34.0:
		tmp = x + (z / (a / y))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -4.5e-73)
		tmp = Float64(y + x);
	elseif (t <= 4.9e-92)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 7e-25)
		tmp = Float64(x - Float64(z * Float64(y / t)));
	elseif (t <= 34.0)
		tmp = Float64(x + Float64(z / Float64(a / y)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -4.5e-73)
		tmp = y + x;
	elseif (t <= 4.9e-92)
		tmp = x + (y * (z / a));
	elseif (t <= 7e-25)
		tmp = x - (z * (y / t));
	elseif (t <= 34.0)
		tmp = x + (z / (a / y));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e-73], N[(y + x), $MachinePrecision], If[LessEqual[t, 4.9e-92], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-25], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 34.0], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-73}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{-92}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-25}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\

\mathbf{elif}\;t \leq 34:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.5e-73 or 34 < t

    1. Initial program 78.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/93.9%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 81.2%

      \[\leadsto \color{blue}{y + x} \]

    if -4.5e-73 < t < 4.9e-92

    1. Initial program 95.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative95.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/97.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} + x \]
      3. fma-def97.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified97.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
    5. Applied egg-rr97.9%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
    6. Taylor expanded in t around 0 86.7%

      \[\leadsto y \cdot \color{blue}{\frac{z}{a}} + x \]

    if 4.9e-92 < t < 7.0000000000000004e-25

    1. Initial program 94.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/95.0%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified95.0%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 66.5%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/71.5%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative71.5%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    6. Simplified71.5%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Taylor expanded in a around 0 66.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t} + x} \]
    8. Step-by-step derivation
      1. +-commutative66.8%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{t}} \]
      2. mul-1-neg66.8%

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot z}{t}\right)} \]
      3. sub-neg66.8%

        \[\leadsto \color{blue}{x - \frac{y \cdot z}{t}} \]
      4. associate-*l/66.6%

        \[\leadsto x - \color{blue}{\frac{y}{t} \cdot z} \]
      5. *-commutative66.6%

        \[\leadsto x - \color{blue}{z \cdot \frac{y}{t}} \]
    9. Simplified66.6%

      \[\leadsto \color{blue}{x - z \cdot \frac{y}{t}} \]

    if 7.0000000000000004e-25 < t < 34

    1. Initial program 99.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 99.7%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative99.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    6. Simplified99.7%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Step-by-step derivation
      1. clear-num100.0%

        \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{a - t}{y}}} \]
      2. un-div-inv100.0%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a - t}{y}}} \]
    8. Applied egg-rr100.0%

      \[\leadsto x + \color{blue}{\frac{z}{\frac{a - t}{y}}} \]
    9. Taylor expanded in a around inf 100.0%

      \[\leadsto x + \frac{z}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification82.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-73}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-92}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-25}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 34:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 3: 84.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+64} \lor \neg \left(t \leq 2.4 \cdot 10^{+146}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -3.5e+64) (not (<= t 2.4e+146)))
   (+ y x)
   (+ x (/ z (/ (- a t) y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.5e+64) || !(t <= 2.4e+146)) {
		tmp = y + x;
	} else {
		tmp = x + (z / ((a - t) / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-3.5d+64)) .or. (.not. (t <= 2.4d+146))) then
        tmp = y + x
    else
        tmp = x + (z / ((a - t) / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -3.5e+64) || !(t <= 2.4e+146)) {
		tmp = y + x;
	} else {
		tmp = x + (z / ((a - t) / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -3.5e+64) or not (t <= 2.4e+146):
		tmp = y + x
	else:
		tmp = x + (z / ((a - t) / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -3.5e+64) || !(t <= 2.4e+146))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -3.5e+64) || ~((t <= 2.4e+146)))
		tmp = y + x;
	else
		tmp = x + (z / ((a - t) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.5e+64], N[Not[LessEqual[t, 2.4e+146]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+64} \lor \neg \left(t \leq 2.4 \cdot 10^{+146}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.4999999999999999e64 or 2.4000000000000002e146 < t

    1. Initial program 73.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/91.6%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified91.6%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 87.1%

      \[\leadsto \color{blue}{y + x} \]

    if -3.4999999999999999e64 < t < 2.4000000000000002e146

    1. Initial program 93.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.9%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.9%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 81.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/84.4%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative84.4%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    6. Simplified84.4%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Step-by-step derivation
      1. clear-num84.3%

        \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{a - t}{y}}} \]
      2. un-div-inv84.8%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a - t}{y}}} \]
    8. Applied egg-rr84.8%

      \[\leadsto x + \color{blue}{\frac{z}{\frac{a - t}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+64} \lor \neg \left(t \leq 2.4 \cdot 10^{+146}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \end{array} \]

Alternative 4: 82.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-25} \lor \neg \left(t \leq 4.2 \cdot 10^{-93}\right):\\ \;\;\;\;\left(y + x\right) - \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2.2e-25) (not (<= t 4.2e-93)))
   (- (+ y x) (/ y (/ t z)))
   (+ x (* y (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.2e-25) || !(t <= 4.2e-93)) {
		tmp = (y + x) - (y / (t / z));
	} else {
		tmp = x + (y * ((z - t) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-2.2d-25)) .or. (.not. (t <= 4.2d-93))) then
        tmp = (y + x) - (y / (t / z))
    else
        tmp = x + (y * ((z - t) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.2e-25) || !(t <= 4.2e-93)) {
		tmp = (y + x) - (y / (t / z));
	} else {
		tmp = x + (y * ((z - t) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.2e-25) or not (t <= 4.2e-93):
		tmp = (y + x) - (y / (t / z))
	else:
		tmp = x + (y * ((z - t) / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.2e-25) || !(t <= 4.2e-93))
		tmp = Float64(Float64(y + x) - Float64(y / Float64(t / z)));
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -2.2e-25) || ~((t <= 4.2e-93)))
		tmp = (y + x) - (y / (t / z));
	else
		tmp = x + (y * ((z - t) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.2e-25], N[Not[LessEqual[t, 4.2e-93]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-25} \lor \neg \left(t \leq 4.2 \cdot 10^{-93}\right):\\
\;\;\;\;\left(y + x\right) - \frac{y}{\frac{t}{z}}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2000000000000002e-25 or 4.2000000000000002e-93 < t

    1. Initial program 80.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.0%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around -inf 81.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z - a \cdot y}{t} + \left(y + x\right)} \]
    5. Step-by-step derivation
      1. +-commutative81.4%

        \[\leadsto \color{blue}{\left(y + x\right) + -1 \cdot \frac{y \cdot z - a \cdot y}{t}} \]
      2. mul-1-neg81.4%

        \[\leadsto \left(y + x\right) + \color{blue}{\left(-\frac{y \cdot z - a \cdot y}{t}\right)} \]
      3. unsub-neg81.4%

        \[\leadsto \color{blue}{\left(y + x\right) - \frac{y \cdot z - a \cdot y}{t}} \]
      4. *-commutative81.4%

        \[\leadsto \left(y + x\right) - \frac{y \cdot z - \color{blue}{y \cdot a}}{t} \]
      5. distribute-lft-out--81.4%

        \[\leadsto \left(y + x\right) - \frac{\color{blue}{y \cdot \left(z - a\right)}}{t} \]
      6. associate-/l*86.3%

        \[\leadsto \left(y + x\right) - \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    6. Simplified86.3%

      \[\leadsto \color{blue}{\left(y + x\right) - \frac{y}{\frac{t}{z - a}}} \]
    7. Taylor expanded in z around inf 89.5%

      \[\leadsto \left(y + x\right) - \frac{y}{\color{blue}{\frac{t}{z}}} \]

    if -2.2000000000000002e-25 < t < 4.2000000000000002e-93

    1. Initial program 96.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative96.1%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/98.0%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} + x \]
      3. fma-def98.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified98.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef98.0%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
    5. Applied egg-rr98.0%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
    6. Taylor expanded in a around inf 90.2%

      \[\leadsto y \cdot \color{blue}{\frac{z - t}{a}} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-25} \lor \neg \left(t \leq 4.2 \cdot 10^{-93}\right):\\ \;\;\;\;\left(y + x\right) - \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]

Alternative 5: 84.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{+64}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+146}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -4.7e+64)
   (+ y x)
   (if (<= t 3e+146) (+ x (* z (/ y (- a t)))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.7e+64) {
		tmp = y + x;
	} else if (t <= 3e+146) {
		tmp = x + (z * (y / (a - t)));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-4.7d+64)) then
        tmp = y + x
    else if (t <= 3d+146) then
        tmp = x + (z * (y / (a - t)))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.7e+64) {
		tmp = y + x;
	} else if (t <= 3e+146) {
		tmp = x + (z * (y / (a - t)));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -4.7e+64:
		tmp = y + x
	elif t <= 3e+146:
		tmp = x + (z * (y / (a - t)))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -4.7e+64)
		tmp = Float64(y + x);
	elseif (t <= 3e+146)
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -4.7e+64)
		tmp = y + x;
	elseif (t <= 3e+146)
		tmp = x + (z * (y / (a - t)));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.7e+64], N[(y + x), $MachinePrecision], If[LessEqual[t, 3e+146], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+64}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 3 \cdot 10^{+146}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.70000000000000029e64 or 3.00000000000000002e146 < t

    1. Initial program 73.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/92.3%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 88.0%

      \[\leadsto \color{blue}{y + x} \]

    if -4.70000000000000029e64 < t < 3.00000000000000002e146

    1. Initial program 93.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.5%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.5%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 81.8%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/84.0%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative84.0%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    6. Simplified84.0%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{+64}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+146}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 6: 96.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 2.45 \cdot 10^{+190}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) - \frac{y}{\frac{t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t 2.45e+190)
   (+ x (* (- z t) (/ y (- a t))))
   (- (+ y x) (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 2.45e+190) {
		tmp = x + ((z - t) * (y / (a - t)));
	} else {
		tmp = (y + x) - (y / (t / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= 2.45d+190) then
        tmp = x + ((z - t) * (y / (a - t)))
    else
        tmp = (y + x) - (y / (t / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= 2.45e+190) {
		tmp = x + ((z - t) * (y / (a - t)));
	} else {
		tmp = (y + x) - (y / (t / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= 2.45e+190:
		tmp = x + ((z - t) * (y / (a - t)))
	else:
		tmp = (y + x) - (y / (t / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= 2.45e+190)
		tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t))));
	else
		tmp = Float64(Float64(y + x) - Float64(y / Float64(t / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= 2.45e+190)
		tmp = x + ((z - t) * (y / (a - t)));
	else
		tmp = (y + x) - (y / (t / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.45e+190], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.45 \cdot 10^{+190}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\

\mathbf{else}:\\
\;\;\;\;\left(y + x\right) - \frac{y}{\frac{t}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.4499999999999998e190

    1. Initial program 89.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/95.0%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified95.0%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]

    if 2.4499999999999998e190 < t

    1. Initial program 67.5%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/85.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified85.2%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around -inf 91.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z - a \cdot y}{t} + \left(y + x\right)} \]
    5. Step-by-step derivation
      1. +-commutative91.1%

        \[\leadsto \color{blue}{\left(y + x\right) + -1 \cdot \frac{y \cdot z - a \cdot y}{t}} \]
      2. mul-1-neg91.1%

        \[\leadsto \left(y + x\right) + \color{blue}{\left(-\frac{y \cdot z - a \cdot y}{t}\right)} \]
      3. unsub-neg91.1%

        \[\leadsto \color{blue}{\left(y + x\right) - \frac{y \cdot z - a \cdot y}{t}} \]
      4. *-commutative91.1%

        \[\leadsto \left(y + x\right) - \frac{y \cdot z - \color{blue}{y \cdot a}}{t} \]
      5. distribute-lft-out--91.1%

        \[\leadsto \left(y + x\right) - \frac{\color{blue}{y \cdot \left(z - a\right)}}{t} \]
      6. associate-/l*100.0%

        \[\leadsto \left(y + x\right) - \color{blue}{\frac{y}{\frac{t}{z - a}}} \]
    6. Simplified100.0%

      \[\leadsto \color{blue}{\left(y + x\right) - \frac{y}{\frac{t}{z - a}}} \]
    7. Taylor expanded in z around inf 100.0%

      \[\leadsto \left(y + x\right) - \frac{y}{\color{blue}{\frac{t}{z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.45 \cdot 10^{+190}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) - \frac{y}{\frac{t}{z}}\\ \end{array} \]

Alternative 7: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-73} \lor \neg \left(t \leq 3.8 \cdot 10^{-90}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -4.8e-73) (not (<= t 3.8e-90))) (+ y x) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -4.8e-73) || !(t <= 3.8e-90)) {
		tmp = y + x;
	} else {
		tmp = x + (z / (a / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-4.8d-73)) .or. (.not. (t <= 3.8d-90))) then
        tmp = y + x
    else
        tmp = x + (z / (a / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -4.8e-73) || !(t <= 3.8e-90)) {
		tmp = y + x;
	} else {
		tmp = x + (z / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -4.8e-73) or not (t <= 3.8e-90):
		tmp = y + x
	else:
		tmp = x + (z / (a / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -4.8e-73) || !(t <= 3.8e-90))
		tmp = Float64(y + x);
	else
		tmp = Float64(x + Float64(z / Float64(a / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -4.8e-73) || ~((t <= 3.8e-90)))
		tmp = y + x;
	else
		tmp = x + (z / (a / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e-73], N[Not[LessEqual[t, 3.8e-90]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-73} \lor \neg \left(t \leq 3.8 \cdot 10^{-90}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.80000000000000011e-73 or 3.8e-90 < t

    1. Initial program 81.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 77.7%

      \[\leadsto \color{blue}{y + x} \]

    if -4.80000000000000011e-73 < t < 3.8e-90

    1. Initial program 95.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/93.1%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified93.1%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 89.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/89.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative89.2%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    6. Simplified89.2%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Step-by-step derivation
      1. clear-num89.2%

        \[\leadsto x + z \cdot \color{blue}{\frac{1}{\frac{a - t}{y}}} \]
      2. un-div-inv90.0%

        \[\leadsto x + \color{blue}{\frac{z}{\frac{a - t}{y}}} \]
    8. Applied egg-rr90.0%

      \[\leadsto x + \color{blue}{\frac{z}{\frac{a - t}{y}}} \]
    9. Taylor expanded in a around inf 85.6%

      \[\leadsto x + \frac{z}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-73} \lor \neg \left(t \leq 3.8 \cdot 10^{-90}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 8: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-74}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-88}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.4e-74) (+ y x) (if (<= t 2.8e-88) (+ x (* z (/ y a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.4e-74) {
		tmp = y + x;
	} else if (t <= 2.8e-88) {
		tmp = x + (z * (y / a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-2.4d-74)) then
        tmp = y + x
    else if (t <= 2.8d-88) then
        tmp = x + (z * (y / a))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.4e-74) {
		tmp = y + x;
	} else if (t <= 2.8e-88) {
		tmp = x + (z * (y / a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -2.4e-74:
		tmp = y + x
	elif t <= 2.8e-88:
		tmp = x + (z * (y / a))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.4e-74)
		tmp = Float64(y + x);
	elseif (t <= 2.8e-88)
		tmp = Float64(x + Float64(z * Float64(y / a)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -2.4e-74)
		tmp = y + x;
	elseif (t <= 2.8e-88)
		tmp = x + (z * (y / a));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.4e-74], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.8e-88], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-74}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-88}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.3999999999999999e-74 or 2.79999999999999976e-88 < t

    1. Initial program 81.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 77.7%

      \[\leadsto \color{blue}{y + x} \]

    if -2.3999999999999999e-74 < t < 2.79999999999999976e-88

    1. Initial program 95.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/93.1%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified93.1%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in z around inf 89.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/89.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative89.2%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    6. Simplified89.2%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Taylor expanded in a around inf 85.0%

      \[\leadsto x + z \cdot \color{blue}{\frac{y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-74}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-88}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 9: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.9 \cdot 10^{-73}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-90}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -4.9e-73) (+ y x) (if (<= t 1.35e-90) (+ x (* y (/ z a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.9e-73) {
		tmp = y + x;
	} else if (t <= 1.35e-90) {
		tmp = x + (y * (z / a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-4.9d-73)) then
        tmp = y + x
    else if (t <= 1.35d-90) then
        tmp = x + (y * (z / a))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -4.9e-73) {
		tmp = y + x;
	} else if (t <= 1.35e-90) {
		tmp = x + (y * (z / a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -4.9e-73:
		tmp = y + x
	elif t <= 1.35e-90:
		tmp = x + (y * (z / a))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -4.9e-73)
		tmp = Float64(y + x);
	elseif (t <= 1.35e-90)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -4.9e-73)
		tmp = y + x;
	elseif (t <= 1.35e-90)
		tmp = x + (y * (z / a));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.9e-73], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.35e-90], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.9 \cdot 10^{-73}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-90}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.90000000000000028e-73 or 1.34999999999999998e-90 < t

    1. Initial program 81.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 77.7%

      \[\leadsto \color{blue}{y + x} \]

    if -4.90000000000000028e-73 < t < 1.34999999999999998e-90

    1. Initial program 95.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative95.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*r/97.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} + x \]
      3. fma-def97.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified97.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
    5. Applied egg-rr97.9%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
    6. Taylor expanded in t around 0 85.8%

      \[\leadsto y \cdot \color{blue}{\frac{z}{a}} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.9 \cdot 10^{-73}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-90}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 10: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{a - t}{z - t}} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a):
	return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y / ((a - t) / (z - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
Derivation
  1. Initial program 86.7%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-/l*99.1%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
  3. Simplified99.1%

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
  4. Final simplification99.1%

    \[\leadsto x + \frac{y}{\frac{a - t}{z - t}} \]

Alternative 11: 63.7% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{-75}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 10^{-88}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.15e-75) (+ y x) (if (<= t 1e-88) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.15e-75) {
		tmp = y + x;
	} else if (t <= 1e-88) {
		tmp = x;
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.15d-75)) then
        tmp = y + x
    else if (t <= 1d-88) then
        tmp = x
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.15e-75) {
		tmp = y + x;
	} else if (t <= 1e-88) {
		tmp = x;
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.15e-75:
		tmp = y + x
	elif t <= 1e-88:
		tmp = x
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.15e-75)
		tmp = Float64(y + x);
	elseif (t <= 1e-88)
		tmp = x;
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.15e-75)
		tmp = y + x;
	elseif (t <= 1e-88)
		tmp = x;
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.15e-75], N[(y + x), $MachinePrecision], If[LessEqual[t, 1e-88], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-75}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 10^{-88}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15e-75 or 9.99999999999999934e-89 < t

    1. Initial program 81.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/94.2%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in t around inf 77.7%

      \[\leadsto \color{blue}{y + x} \]

    if -1.15e-75 < t < 9.99999999999999934e-89

    1. Initial program 95.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-*l/93.1%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified93.1%

      \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
    4. Taylor expanded in x around inf 53.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{-75}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 10^{-88}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 12: 50.7% accurate, 11.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 86.7%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-*l/93.8%

      \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
  3. Simplified93.8%

    \[\leadsto \color{blue}{x + \frac{y}{a - t} \cdot \left(z - t\right)} \]
  4. Taylor expanded in x around inf 51.1%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification51.1%

    \[\leadsto x \]

Developer target: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{a - t}{z - t}} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a):
	return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y / ((a - t) / (z - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}

Reproduce

?
herbie shell --seed 2023196 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- a t) (- z t))))

  (+ x (/ (* y (- z t)) (- a t))))