Data.Colour.RGB:hslsv from colour-2.3.3, B

Percentage Accurate: 99.4% → 99.8%
Time: 14.1s
Alternatives: 20
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a):
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\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 20 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: 99.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a):
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a)
	return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0))
end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
  4. Final simplification99.8%

    \[\leadsto \mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right) \]

Alternative 2: 55.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ t_2 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;x \leq -7.2 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-234}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-112}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+93}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (* 60.0 (/ x (- z t)))))
   (if (<= x -7.2e+150)
     t_2
     (if (<= x 4.3e-234)
       (* a 120.0)
       (if (<= x 2.75e-157)
         t_1
         (if (<= x 2.1e-112)
           (* a 120.0)
           (if (<= x 1.25e-91) t_1 (if (<= x 1.85e+93) (* a 120.0) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (x <= -7.2e+150) {
		tmp = t_2;
	} else if (x <= 4.3e-234) {
		tmp = a * 120.0;
	} else if (x <= 2.75e-157) {
		tmp = t_1;
	} else if (x <= 2.1e-112) {
		tmp = a * 120.0;
	} else if (x <= 1.25e-91) {
		tmp = t_1;
	} else if (x <= 1.85e+93) {
		tmp = a * 120.0;
	} else {
		tmp = t_2;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-60.0d0) * (y / (z - t))
    t_2 = 60.0d0 * (x / (z - t))
    if (x <= (-7.2d+150)) then
        tmp = t_2
    else if (x <= 4.3d-234) then
        tmp = a * 120.0d0
    else if (x <= 2.75d-157) then
        tmp = t_1
    else if (x <= 2.1d-112) then
        tmp = a * 120.0d0
    else if (x <= 1.25d-91) then
        tmp = t_1
    else if (x <= 1.85d+93) then
        tmp = a * 120.0d0
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (x <= -7.2e+150) {
		tmp = t_2;
	} else if (x <= 4.3e-234) {
		tmp = a * 120.0;
	} else if (x <= 2.75e-157) {
		tmp = t_1;
	} else if (x <= 2.1e-112) {
		tmp = a * 120.0;
	} else if (x <= 1.25e-91) {
		tmp = t_1;
	} else if (x <= 1.85e+93) {
		tmp = a * 120.0;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	t_2 = 60.0 * (x / (z - t))
	tmp = 0
	if x <= -7.2e+150:
		tmp = t_2
	elif x <= 4.3e-234:
		tmp = a * 120.0
	elif x <= 2.75e-157:
		tmp = t_1
	elif x <= 2.1e-112:
		tmp = a * 120.0
	elif x <= 1.25e-91:
		tmp = t_1
	elif x <= 1.85e+93:
		tmp = a * 120.0
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	t_2 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (x <= -7.2e+150)
		tmp = t_2;
	elseif (x <= 4.3e-234)
		tmp = Float64(a * 120.0);
	elseif (x <= 2.75e-157)
		tmp = t_1;
	elseif (x <= 2.1e-112)
		tmp = Float64(a * 120.0);
	elseif (x <= 1.25e-91)
		tmp = t_1;
	elseif (x <= 1.85e+93)
		tmp = Float64(a * 120.0);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	t_2 = 60.0 * (x / (z - t));
	tmp = 0.0;
	if (x <= -7.2e+150)
		tmp = t_2;
	elseif (x <= 4.3e-234)
		tmp = a * 120.0;
	elseif (x <= 2.75e-157)
		tmp = t_1;
	elseif (x <= 2.1e-112)
		tmp = a * 120.0;
	elseif (x <= 1.25e-91)
		tmp = t_1;
	elseif (x <= 1.85e+93)
		tmp = a * 120.0;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+150], t$95$2, If[LessEqual[x, 4.3e-234], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 2.75e-157], t$95$1, If[LessEqual[x, 2.1e-112], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.25e-91], t$95$1, If[LessEqual[x, 1.85e+93], N[(a * 120.0), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+150}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{-234}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 2.75 \cdot 10^{-157}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{-91}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.85 \cdot 10^{+93}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.19999999999999972e150 or 1.84999999999999994e93 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in x around inf 73.5%

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

    if -7.19999999999999972e150 < x < 4.3000000000000001e-234 or 2.7499999999999999e-157 < x < 2.1000000000000001e-112 or 1.24999999999999999e-91 < x < 1.84999999999999994e93

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if 4.3000000000000001e-234 < x < 2.7499999999999999e-157 or 2.1000000000000001e-112 < x < 1.24999999999999999e-91

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in99.9%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out99.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.9%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.9%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.9%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.9%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.9%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.9%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.6%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.6%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.6%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.8%

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    8. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 70.1%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/70.0%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*69.9%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified69.9%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in x around 0 70.1%

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+150}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-234}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-157}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-112}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-91}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+93}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \end{array} \]

Alternative 3: 78.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z - t \leq -1 \cdot 10^{+80} \lor \neg \left(z - t \leq 5 \cdot 10^{+18}\right):\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= (- z t) -1e+80) (not (<= (- z t) 5e+18)))
   (+ (* x (/ 60.0 (- z t))) (* a 120.0))
   (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((z - t) <= -1e+80) || !((z - t) <= 5e+18)) {
		tmp = (x * (60.0 / (z - t))) + (a * 120.0);
	} else {
		tmp = (x - y) / ((z - t) * 0.016666666666666666);
	}
	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 (((z - t) <= (-1d+80)) .or. (.not. ((z - t) <= 5d+18))) then
        tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
    else
        tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((z - t) <= -1e+80) || !((z - t) <= 5e+18)) {
		tmp = (x * (60.0 / (z - t))) + (a * 120.0);
	} else {
		tmp = (x - y) / ((z - t) * 0.016666666666666666);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if ((z - t) <= -1e+80) or not ((z - t) <= 5e+18):
		tmp = (x * (60.0 / (z - t))) + (a * 120.0)
	else:
		tmp = (x - y) / ((z - t) * 0.016666666666666666)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((Float64(z - t) <= -1e+80) || !(Float64(z - t) <= 5e+18))
		tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0));
	else
		tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (((z - t) <= -1e+80) || ~(((z - t) <= 5e+18)))
		tmp = (x * (60.0 / (z - t))) + (a * 120.0);
	else
		tmp = (x - y) / ((z - t) * 0.016666666666666666);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -1e+80], N[Not[LessEqual[N[(z - t), $MachinePrecision], 5e+18]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{+80} \lor \neg \left(z - t \leq 5 \cdot 10^{+18}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -1e80 or 5e18 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. associate-*r/81.2%

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} + a \cdot 120 \]
      2. associate-*l/81.2%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} + a \cdot 120 \]
      3. *-commutative81.2%

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

      \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} + a \cdot 120 \]

    if -1e80 < (-.f64 z t) < 5e18

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out97.6%

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \frac{60}{z - t} + \color{blue}{\frac{60}{z - t} \cdot x}\right) + a \cdot 120 \]
      9. *-commutative97.6%

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.8%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.8%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.8%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.8%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.8%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.8%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    8. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 81.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/81.7%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*81.8%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified81.8%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in x around 0 79.6%

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + 60 \cdot \frac{x}{z - t}} \]
    13. Step-by-step derivation
      1. *-commutative97.7%

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out97.6%

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \frac{60}{z - t} + \color{blue}{\frac{60}{z - t} \cdot x}\right) + a \cdot 120 \]
      9. *-commutative97.6%

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.8%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.8%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.8%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.8%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -1 \cdot 10^{+80} \lor \neg \left(z - t \leq 5 \cdot 10^{+18}\right):\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\ \end{array} \]

Alternative 4: 52.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6900000000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-66}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-119}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+70}:\\ \;\;\;\;\frac{60}{\frac{-t}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -6900000000.0)
   (* a 120.0)
   (if (<= t -1.45e-66)
     (/ (* 60.0 x) (- z t))
     (if (<= t -4.5e-127)
       (* a 120.0)
       (if (<= t 5.8e-119)
         (* 60.0 (/ (- x y) z))
         (if (<= t 7e+70) (/ 60.0 (/ (- t) (- x y))) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -6900000000.0) {
		tmp = a * 120.0;
	} else if (t <= -1.45e-66) {
		tmp = (60.0 * x) / (z - t);
	} else if (t <= -4.5e-127) {
		tmp = a * 120.0;
	} else if (t <= 5.8e-119) {
		tmp = 60.0 * ((x - y) / z);
	} else if (t <= 7e+70) {
		tmp = 60.0 / (-t / (x - y));
	} else {
		tmp = a * 120.0;
	}
	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 <= (-6900000000.0d0)) then
        tmp = a * 120.0d0
    else if (t <= (-1.45d-66)) then
        tmp = (60.0d0 * x) / (z - t)
    else if (t <= (-4.5d-127)) then
        tmp = a * 120.0d0
    else if (t <= 5.8d-119) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (t <= 7d+70) then
        tmp = 60.0d0 / (-t / (x - y))
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -6900000000.0) {
		tmp = a * 120.0;
	} else if (t <= -1.45e-66) {
		tmp = (60.0 * x) / (z - t);
	} else if (t <= -4.5e-127) {
		tmp = a * 120.0;
	} else if (t <= 5.8e-119) {
		tmp = 60.0 * ((x - y) / z);
	} else if (t <= 7e+70) {
		tmp = 60.0 / (-t / (x - y));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -6900000000.0:
		tmp = a * 120.0
	elif t <= -1.45e-66:
		tmp = (60.0 * x) / (z - t)
	elif t <= -4.5e-127:
		tmp = a * 120.0
	elif t <= 5.8e-119:
		tmp = 60.0 * ((x - y) / z)
	elif t <= 7e+70:
		tmp = 60.0 / (-t / (x - y))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -6900000000.0)
		tmp = Float64(a * 120.0);
	elseif (t <= -1.45e-66)
		tmp = Float64(Float64(60.0 * x) / Float64(z - t));
	elseif (t <= -4.5e-127)
		tmp = Float64(a * 120.0);
	elseif (t <= 5.8e-119)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (t <= 7e+70)
		tmp = Float64(60.0 / Float64(Float64(-t) / Float64(x - y)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -6900000000.0)
		tmp = a * 120.0;
	elseif (t <= -1.45e-66)
		tmp = (60.0 * x) / (z - t);
	elseif (t <= -4.5e-127)
		tmp = a * 120.0;
	elseif (t <= 5.8e-119)
		tmp = 60.0 * ((x - y) / z);
	elseif (t <= 7e+70)
		tmp = 60.0 / (-t / (x - y));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6900000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, -1.45e-66], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-127], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, 5.8e-119], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+70], N[(60.0 / N[((-t) / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6900000000:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-66}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-127}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-119}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;t \leq 7 \cdot 10^{+70}:\\
\;\;\;\;\frac{60}{\frac{-t}{x - y}}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.9e9 or -1.45000000000000006e-66 < t < -4.4999999999999999e-127 or 7.00000000000000005e70 < t

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -6.9e9 < t < -1.45000000000000006e-66

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in x around inf 59.7%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z - t}} \]
    6. Step-by-step derivation
      1. associate-*r/59.8%

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    7. Applied egg-rr59.8%

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

    if -4.4999999999999999e-127 < t < 5.8e-119

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in z around inf 70.1%

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

    if 5.8e-119 < t < 7.00000000000000005e70

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in99.8%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out99.8%

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \frac{60}{z - t} + \color{blue}{\frac{60}{z - t} \cdot x}\right) + a \cdot 120 \]
      9. *-commutative99.8%

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.7%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.8%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.8%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.9%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.9%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    8. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 64.6%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/64.5%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*64.6%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified64.6%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in z around 0 50.7%

      \[\leadsto \frac{60}{\color{blue}{-1 \cdot \frac{t}{x - y}}} \]
    13. Step-by-step derivation
      1. neg-mul-150.7%

        \[\leadsto \frac{60}{\color{blue}{-\frac{t}{x - y}}} \]
      2. distribute-neg-frac50.7%

        \[\leadsto \frac{60}{\color{blue}{\frac{-t}{x - y}}} \]
    14. Simplified50.7%

      \[\leadsto \frac{60}{\color{blue}{\frac{-t}{x - y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification64.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6900000000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-66}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-119}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+70}:\\ \;\;\;\;\frac{60}{\frac{-t}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 52.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z}\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{-26}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{-127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+70}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) z))))
   (if (<= t -1.8e-26)
     (* a 120.0)
     (if (<= t -4.1e-75)
       t_1
       (if (<= t -6.3e-127)
         (* a 120.0)
         (if (<= t 9e-119)
           t_1
           (if (<= t 9.5e+70) (* -60.0 (/ (- x y) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / z);
	double tmp;
	if (t <= -1.8e-26) {
		tmp = a * 120.0;
	} else if (t <= -4.1e-75) {
		tmp = t_1;
	} else if (t <= -6.3e-127) {
		tmp = a * 120.0;
	} else if (t <= 9e-119) {
		tmp = t_1;
	} else if (t <= 9.5e+70) {
		tmp = -60.0 * ((x - y) / t);
	} else {
		tmp = a * 120.0;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / z)
    if (t <= (-1.8d-26)) then
        tmp = a * 120.0d0
    else if (t <= (-4.1d-75)) then
        tmp = t_1
    else if (t <= (-6.3d-127)) then
        tmp = a * 120.0d0
    else if (t <= 9d-119) then
        tmp = t_1
    else if (t <= 9.5d+70) then
        tmp = (-60.0d0) * ((x - y) / t)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / z);
	double tmp;
	if (t <= -1.8e-26) {
		tmp = a * 120.0;
	} else if (t <= -4.1e-75) {
		tmp = t_1;
	} else if (t <= -6.3e-127) {
		tmp = a * 120.0;
	} else if (t <= 9e-119) {
		tmp = t_1;
	} else if (t <= 9.5e+70) {
		tmp = -60.0 * ((x - y) / t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / z)
	tmp = 0
	if t <= -1.8e-26:
		tmp = a * 120.0
	elif t <= -4.1e-75:
		tmp = t_1
	elif t <= -6.3e-127:
		tmp = a * 120.0
	elif t <= 9e-119:
		tmp = t_1
	elif t <= 9.5e+70:
		tmp = -60.0 * ((x - y) / t)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / z))
	tmp = 0.0
	if (t <= -1.8e-26)
		tmp = Float64(a * 120.0);
	elseif (t <= -4.1e-75)
		tmp = t_1;
	elseif (t <= -6.3e-127)
		tmp = Float64(a * 120.0);
	elseif (t <= 9e-119)
		tmp = t_1;
	elseif (t <= 9.5e+70)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / z);
	tmp = 0.0;
	if (t <= -1.8e-26)
		tmp = a * 120.0;
	elseif (t <= -4.1e-75)
		tmp = t_1;
	elseif (t <= -6.3e-127)
		tmp = a * 120.0;
	elseif (t <= 9e-119)
		tmp = t_1;
	elseif (t <= 9.5e+70)
		tmp = -60.0 * ((x - y) / t);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e-26], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, -4.1e-75], t$95$1, If[LessEqual[t, -6.3e-127], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, 9e-119], t$95$1, If[LessEqual[t, 9.5e+70], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{-26}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-75}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -6.3 \cdot 10^{-127}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+70}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8000000000000001e-26 or -4.10000000000000002e-75 < t < -6.2999999999999999e-127 or 9.5000000000000002e70 < t

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -1.8000000000000001e-26 < t < -4.10000000000000002e-75 or -6.2999999999999999e-127 < t < 9.0000000000000005e-119

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in z around inf 69.1%

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

    if 9.0000000000000005e-119 < t < 9.5000000000000002e70

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in99.8%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out99.8%

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \frac{60}{z - t} + \color{blue}{\frac{60}{z - t} \cdot x}\right) + a \cdot 120 \]
      9. *-commutative99.8%

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.7%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.8%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.8%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.9%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.9%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    8. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 64.6%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/64.5%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*64.6%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified64.6%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in z around 0 50.7%

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-26}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-75}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{-127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-119}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+70}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 6: 52.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7200000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-68}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-128}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-119}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{+71}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -7200000.0)
   (* a 120.0)
   (if (<= t -1.25e-68)
     (/ (* 60.0 x) (- z t))
     (if (<= t -1.7e-128)
       (* a 120.0)
       (if (<= t 9.6e-119)
         (* 60.0 (/ (- x y) z))
         (if (<= t 1.06e+71) (* -60.0 (/ (- x y) t)) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7200000.0) {
		tmp = a * 120.0;
	} else if (t <= -1.25e-68) {
		tmp = (60.0 * x) / (z - t);
	} else if (t <= -1.7e-128) {
		tmp = a * 120.0;
	} else if (t <= 9.6e-119) {
		tmp = 60.0 * ((x - y) / z);
	} else if (t <= 1.06e+71) {
		tmp = -60.0 * ((x - y) / t);
	} else {
		tmp = a * 120.0;
	}
	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 <= (-7200000.0d0)) then
        tmp = a * 120.0d0
    else if (t <= (-1.25d-68)) then
        tmp = (60.0d0 * x) / (z - t)
    else if (t <= (-1.7d-128)) then
        tmp = a * 120.0d0
    else if (t <= 9.6d-119) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (t <= 1.06d+71) then
        tmp = (-60.0d0) * ((x - y) / t)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7200000.0) {
		tmp = a * 120.0;
	} else if (t <= -1.25e-68) {
		tmp = (60.0 * x) / (z - t);
	} else if (t <= -1.7e-128) {
		tmp = a * 120.0;
	} else if (t <= 9.6e-119) {
		tmp = 60.0 * ((x - y) / z);
	} else if (t <= 1.06e+71) {
		tmp = -60.0 * ((x - y) / t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -7200000.0:
		tmp = a * 120.0
	elif t <= -1.25e-68:
		tmp = (60.0 * x) / (z - t)
	elif t <= -1.7e-128:
		tmp = a * 120.0
	elif t <= 9.6e-119:
		tmp = 60.0 * ((x - y) / z)
	elif t <= 1.06e+71:
		tmp = -60.0 * ((x - y) / t)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -7200000.0)
		tmp = Float64(a * 120.0);
	elseif (t <= -1.25e-68)
		tmp = Float64(Float64(60.0 * x) / Float64(z - t));
	elseif (t <= -1.7e-128)
		tmp = Float64(a * 120.0);
	elseif (t <= 9.6e-119)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (t <= 1.06e+71)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -7200000.0)
		tmp = a * 120.0;
	elseif (t <= -1.25e-68)
		tmp = (60.0 * x) / (z - t);
	elseif (t <= -1.7e-128)
		tmp = a * 120.0;
	elseif (t <= 9.6e-119)
		tmp = 60.0 * ((x - y) / z);
	elseif (t <= 1.06e+71)
		tmp = -60.0 * ((x - y) / t);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7200000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, -1.25e-68], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-128], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, 9.6e-119], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.06e+71], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7200000:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-68}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-128}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{-119}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;t \leq 1.06 \cdot 10^{+71}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.2e6 or -1.24999999999999993e-68 < t < -1.69999999999999987e-128 or 1.06e71 < t

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -7.2e6 < t < -1.24999999999999993e-68

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in x around inf 59.7%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z - t}} \]
    6. Step-by-step derivation
      1. associate-*r/59.8%

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    7. Applied egg-rr59.8%

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

    if -1.69999999999999987e-128 < t < 9.60000000000000034e-119

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in z around inf 70.1%

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

    if 9.60000000000000034e-119 < t < 1.06e71

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in99.8%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out99.8%

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

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

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

        \[\leadsto \left(\left(-y\right) \cdot \frac{60}{z - t} + \color{blue}{\frac{60}{z - t} \cdot x}\right) + a \cdot 120 \]
      9. *-commutative99.8%

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.7%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.7%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.8%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.8%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.9%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.9%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    8. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 64.6%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/64.5%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*64.6%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified64.6%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in z around 0 50.7%

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification64.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7200000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-68}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-128}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-119}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{+71}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 7: 72.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* a 120.0) -5e+86)
   (+ (* a 120.0) (* 60.0 (/ x z)))
   (if (<= (* a 120.0) 1e-30)
     (* 60.0 (/ (- x y) (- z t)))
     (+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -5e+86) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 1e-30) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	}
	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 ((a * 120.0d0) <= (-5d+86)) then
        tmp = (a * 120.0d0) + (60.0d0 * (x / z))
    else if ((a * 120.0d0) <= 1d-30) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -5e+86) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 1e-30) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a * 120.0) <= -5e+86:
		tmp = (a * 120.0) + (60.0 * (x / z))
	elif (a * 120.0) <= 1e-30:
		tmp = 60.0 * ((x - y) / (z - t))
	else:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(a * 120.0) <= -5e+86)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z)));
	elseif (Float64(a * 120.0) <= 1e-30)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	else
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a * 120.0) <= -5e+86)
		tmp = (a * 120.0) + (60.0 * (x / z));
	elseif ((a * 120.0) <= 1e-30)
		tmp = 60.0 * ((x - y) / (z - t));
	else
		tmp = (a * 120.0) + (-60.0 * (x / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+86], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-30], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\

\mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.9999999999999998e86

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a + 60 \cdot \frac{x}{z - t}} \]
    5. Step-by-step derivation
      1. fma-def96.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, 60 \cdot \frac{x}{z - t}\right)} \]
      2. associate-*r/96.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60 \cdot x}{z - t}}\right) \]
      3. associate-*l/96.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60}{z - t} \cdot x}\right) \]
      4. *-commutative96.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{x \cdot \frac{60}{z - t}}\right) \]
    6. Simplified96.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, x \cdot \frac{60}{z - t}\right)} \]
    7. Taylor expanded in z around inf 87.8%

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

    if -4.9999999999999998e86 < (*.f64 a 120) < 1e-30

    1. Initial program 99.6%

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

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

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

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

    if 1e-30 < (*.f64 a 120)

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a + 60 \cdot \frac{x}{z - t}} \]
    5. Step-by-step derivation
      1. fma-def83.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, 60 \cdot \frac{x}{z - t}\right)} \]
      2. associate-*r/83.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60 \cdot x}{z - t}}\right) \]
      3. associate-*l/83.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60}{z - t} \cdot x}\right) \]
      4. *-commutative83.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{x \cdot \frac{60}{z - t}}\right) \]
    6. Simplified83.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, x \cdot \frac{60}{z - t}\right)} \]
    7. Taylor expanded in z around 0 75.7%

      \[\leadsto \color{blue}{120 \cdot a + -60 \cdot \frac{x}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \end{array} \]

Alternative 8: 72.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* a 120.0) -5e+86)
   (+ (* a 120.0) (* 60.0 (/ x z)))
   (if (<= (* a 120.0) 1e-30)
     (* 60.0 (/ (- x y) (- z t)))
     (+ (* a 120.0) (/ x (* t -0.016666666666666666))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -5e+86) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 1e-30) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
	}
	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 ((a * 120.0d0) <= (-5d+86)) then
        tmp = (a * 120.0d0) + (60.0d0 * (x / z))
    else if ((a * 120.0d0) <= 1d-30) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else
        tmp = (a * 120.0d0) + (x / (t * (-0.016666666666666666d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -5e+86) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 1e-30) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a * 120.0) <= -5e+86:
		tmp = (a * 120.0) + (60.0 * (x / z))
	elif (a * 120.0) <= 1e-30:
		tmp = 60.0 * ((x - y) / (z - t))
	else:
		tmp = (a * 120.0) + (x / (t * -0.016666666666666666))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(a * 120.0) <= -5e+86)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z)));
	elseif (Float64(a * 120.0) <= 1e-30)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	else
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(t * -0.016666666666666666)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a * 120.0) <= -5e+86)
		tmp = (a * 120.0) + (60.0 * (x / z));
	elseif ((a * 120.0) <= 1e-30)
		tmp = 60.0 * ((x - y) / (z - t));
	else
		tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+86], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-30], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\

\mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.9999999999999998e86

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a + 60 \cdot \frac{x}{z - t}} \]
    5. Step-by-step derivation
      1. fma-def96.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, 60 \cdot \frac{x}{z - t}\right)} \]
      2. associate-*r/96.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60 \cdot x}{z - t}}\right) \]
      3. associate-*l/96.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60}{z - t} \cdot x}\right) \]
      4. *-commutative96.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{x \cdot \frac{60}{z - t}}\right) \]
    6. Simplified96.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, x \cdot \frac{60}{z - t}\right)} \]
    7. Taylor expanded in z around inf 87.8%

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

    if -4.9999999999999998e86 < (*.f64 a 120) < 1e-30

    1. Initial program 99.6%

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

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

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

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

    if 1e-30 < (*.f64 a 120)

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. associate-*r/83.2%

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

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} + a \cdot 120 \]
      3. associate-/l*83.2%

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

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

      \[\leadsto \frac{x}{\color{blue}{-0.016666666666666666 \cdot t}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. *-commutative75.7%

        \[\leadsto \frac{x}{\color{blue}{t \cdot -0.016666666666666666}} + a \cdot 120 \]
    9. Simplified75.7%

      \[\leadsto \frac{x}{\color{blue}{t \cdot -0.016666666666666666}} + a \cdot 120 \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\ \end{array} \]

Alternative 9: 90.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+69} \lor \neg \left(x \leq 1.4 \cdot 10^{+62}\right):\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -2e+69) (not (<= x 1.4e+62)))
   (+ (* x (/ 60.0 (- z t))) (* a 120.0))
   (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -2e+69) || !(x <= 1.4e+62)) {
		tmp = (x * (60.0 / (z - t))) + (a * 120.0);
	} else {
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
	}
	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 ((x <= (-2d+69)) .or. (.not. (x <= 1.4d+62))) then
        tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
    else
        tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -2e+69) || !(x <= 1.4e+62)) {
		tmp = (x * (60.0 / (z - t))) + (a * 120.0);
	} else {
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -2e+69) or not (x <= 1.4e+62):
		tmp = (x * (60.0 / (z - t))) + (a * 120.0)
	else:
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -2e+69) || !(x <= 1.4e+62))
		tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0));
	else
		tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -2e+69) || ~((x <= 1.4e+62)))
		tmp = (x * (60.0 / (z - t))) + (a * 120.0);
	else
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2e+69], N[Not[LessEqual[x, 1.4e+62]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+69} \lor \neg \left(x \leq 1.4 \cdot 10^{+62}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.0000000000000001e69 or 1.40000000000000007e62 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} + a \cdot 120 \]
      2. associate-*l/87.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} + a \cdot 120 \]
      3. *-commutative87.8%

        \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} + a \cdot 120 \]
    6. Simplified87.8%

      \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} + a \cdot 120 \]

    if -2.0000000000000001e69 < x < 1.40000000000000007e62

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. associate-*r/96.8%

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. associate-/l*96.8%

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} + a \cdot 120 \]
    6. Simplified96.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+69} \lor \neg \left(x \leq 1.4 \cdot 10^{+62}\right):\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\ \end{array} \]

Alternative 10: 90.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{+68} \lor \neg \left(x \leq 2.2 \cdot 10^{+62}\right):\\ \;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -4.4e+68) (not (<= x 2.2e+62)))
   (+ (/ x (/ (- z t) 60.0)) (* a 120.0))
   (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -4.4e+68) || !(x <= 2.2e+62)) {
		tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
	} else {
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
	}
	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 ((x <= (-4.4d+68)) .or. (.not. (x <= 2.2d+62))) then
        tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
    else
        tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -4.4e+68) || !(x <= 2.2e+62)) {
		tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
	} else {
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -4.4e+68) or not (x <= 2.2e+62):
		tmp = (x / ((z - t) / 60.0)) + (a * 120.0)
	else:
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -4.4e+68) || !(x <= 2.2e+62))
		tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0));
	else
		tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -4.4e+68) || ~((x <= 2.2e+62)))
		tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
	else
		tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.4e+68], N[Not[LessEqual[x, 2.2e+62]], $MachinePrecision]], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+68} \lor \neg \left(x \leq 2.2 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.39999999999999974e68 or 2.20000000000000015e62 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} + a \cdot 120 \]
      2. *-commutative87.8%

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} + a \cdot 120 \]
      3. associate-/l*87.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{z - t}{60}}} + a \cdot 120 \]
    6. Simplified87.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{z - t}{60}}} + a \cdot 120 \]

    if -4.39999999999999974e68 < x < 2.20000000000000015e62

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. associate-*r/96.8%

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. associate-/l*96.8%

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} + a \cdot 120 \]
    6. Simplified96.8%

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

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

Alternative 11: 55.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z - t \leq -1 \cdot 10^{+80}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq 10^{-29}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (- z t) -1e+80)
   (* a 120.0)
   (if (<= (- z t) 1e-29) (* -60.0 (/ (- x y) t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z - t) <= -1e+80) {
		tmp = a * 120.0;
	} else if ((z - t) <= 1e-29) {
		tmp = -60.0 * ((x - y) / t);
	} else {
		tmp = a * 120.0;
	}
	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 ((z - t) <= (-1d+80)) then
        tmp = a * 120.0d0
    else if ((z - t) <= 1d-29) then
        tmp = (-60.0d0) * ((x - y) / t)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z - t) <= -1e+80) {
		tmp = a * 120.0;
	} else if ((z - t) <= 1e-29) {
		tmp = -60.0 * ((x - y) / t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z - t) <= -1e+80:
		tmp = a * 120.0
	elif (z - t) <= 1e-29:
		tmp = -60.0 * ((x - y) / t)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(z - t) <= -1e+80)
		tmp = Float64(a * 120.0);
	elseif (Float64(z - t) <= 1e-29)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z - t) <= -1e+80)
		tmp = a * 120.0;
	elseif ((z - t) <= 1e-29)
		tmp = -60.0 * ((x - y) / t);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -1e+80], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-29], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{+80}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -1e80 or 9.99999999999999943e-30 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -1e80 < (-.f64 z t) < 9.99999999999999943e-30

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in97.4%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out97.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.8%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.8%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.8%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.8%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.8%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.9%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.9%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    8. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 83.5%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/83.5%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*83.5%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified83.5%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in z around 0 58.9%

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -1 \cdot 10^{+80}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq 10^{-29}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 12: 74.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+83}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+45}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.1e+83)
   (* a 120.0)
   (if (<= a 4.1e+45) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.1e+83) {
		tmp = a * 120.0;
	} else if (a <= 4.1e+45) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = a * 120.0;
	}
	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 (a <= (-2.1d+83)) then
        tmp = a * 120.0d0
    else if (a <= 4.1d+45) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.1e+83) {
		tmp = a * 120.0;
	} else if (a <= 4.1e+45) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.1e+83:
		tmp = a * 120.0
	elif a <= 4.1e+45:
		tmp = 60.0 * ((x - y) / (z - t))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.1e+83)
		tmp = Float64(a * 120.0);
	elseif (a <= 4.1e+45)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.1e+83)
		tmp = a * 120.0;
	elseif (a <= 4.1e+45)
		tmp = 60.0 * ((x - y) / (z - t));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e+83], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.1e+45], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 4.1 \cdot 10^{+45}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.10000000000000002e83 or 4.10000000000000012e45 < a

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -2.10000000000000002e83 < a < 4.10000000000000012e45

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+83}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+45}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 13: 73.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{+83}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-30}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.45e+83)
   (* a 120.0)
   (if (<= a 5.6e-30)
     (* 60.0 (/ (- x y) (- z t)))
     (+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.45e+83) {
		tmp = a * 120.0;
	} else if (a <= 5.6e-30) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	}
	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 (a <= (-2.45d+83)) then
        tmp = a * 120.0d0
    else if (a <= 5.6d-30) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.45e+83) {
		tmp = a * 120.0;
	} else if (a <= 5.6e-30) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.45e+83:
		tmp = a * 120.0
	elif a <= 5.6e-30:
		tmp = 60.0 * ((x - y) / (z - t))
	else:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.45e+83)
		tmp = Float64(a * 120.0);
	elseif (a <= 5.6e-30)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	else
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.45e+83)
		tmp = a * 120.0;
	elseif (a <= 5.6e-30)
		tmp = 60.0 * ((x - y) / (z - t));
	else
		tmp = (a * 120.0) + (-60.0 * (x / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.45e+83], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.6e-30], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.45 \cdot 10^{+83}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-30}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.44999999999999989e83

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -2.44999999999999989e83 < a < 5.59999999999999977e-30

    1. Initial program 99.6%

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

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

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

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

    if 5.59999999999999977e-30 < a

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a + 60 \cdot \frac{x}{z - t}} \]
    5. Step-by-step derivation
      1. fma-def83.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, 60 \cdot \frac{x}{z - t}\right)} \]
      2. associate-*r/83.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60 \cdot x}{z - t}}\right) \]
      3. associate-*l/83.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60}{z - t} \cdot x}\right) \]
      4. *-commutative83.2%

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{x \cdot \frac{60}{z - t}}\right) \]
    6. Simplified83.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, x \cdot \frac{60}{z - t}\right)} \]
    7. Taylor expanded in z around 0 75.7%

      \[\leadsto \color{blue}{120 \cdot a + -60 \cdot \frac{x}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{+83}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-30}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \end{array} \]

Alternative 14: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{60}{\frac{z - t}{x - y}} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a):
	return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

Alternative 15: 99.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a):
	return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.8%

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Final simplification99.8%

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

Alternative 16: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (- x y) (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
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) * 0.016666666666666666d0)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a):
	return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

      \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
    4. distribute-rgt-neg-in99.0%

      \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
    5. distribute-lft-neg-out99.0%

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

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

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

      \[\leadsto \left(\left(-y\right) \cdot \frac{60}{z - t} + \color{blue}{\frac{60}{z - t} \cdot x}\right) + a \cdot 120 \]
    9. *-commutative99.0%

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

      \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
    11. distribute-rgt-out99.8%

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
    12. sub-neg99.8%

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
    14. /-rgt-identity99.8%

      \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
    15. *-commutative99.8%

      \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
    16. associate-/l*99.8%

      \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
    17. metadata-eval99.8%

      \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
    18. associate-/r*99.8%

      \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
    19. *-commutative99.8%

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

    \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
  7. Final simplification99.8%

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

Alternative 17: 56.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+79}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-94}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.9e+79)
   (* a 120.0)
   (if (<= a 1.75e-94) (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.9e+79) {
		tmp = a * 120.0;
	} else if (a <= 1.75e-94) {
		tmp = -60.0 * (y / (z - t));
	} else {
		tmp = a * 120.0;
	}
	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 (a <= (-2.9d+79)) then
        tmp = a * 120.0d0
    else if (a <= 1.75d-94) then
        tmp = (-60.0d0) * (y / (z - t))
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.9e+79) {
		tmp = a * 120.0;
	} else if (a <= 1.75e-94) {
		tmp = -60.0 * (y / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.9e+79:
		tmp = a * 120.0
	elif a <= 1.75e-94:
		tmp = -60.0 * (y / (z - t))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.9e+79)
		tmp = Float64(a * 120.0);
	elseif (a <= 1.75e-94)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.9e+79)
		tmp = a * 120.0;
	elseif (a <= 1.75e-94)
		tmp = -60.0 * (y / (z - t));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+79], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.75e-94], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+79}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 1.75 \cdot 10^{-94}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.89999999999999992e79 or 1.74999999999999999e-94 < a

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if -2.89999999999999992e79 < a < 1.74999999999999999e-94

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\leadsto \left(\frac{y \cdot \color{blue}{\left(-60\right)}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      4. distribute-rgt-neg-in99.0%

        \[\leadsto \left(\frac{\color{blue}{-y \cdot 60}}{z - t} + 60 \cdot \frac{x}{z - t}\right) + a \cdot 120 \]
      5. distribute-lft-neg-out99.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot \frac{60}{z - t} + \left(-y\right) \cdot \frac{60}{z - t}\right)} + a \cdot 120 \]
      11. distribute-rgt-out99.7%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} + a \cdot 120 \]
      12. sub-neg99.7%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      14. /-rgt-identity99.6%

        \[\leadsto \frac{\color{blue}{\frac{60 \cdot \left(x - y\right)}{1}}}{z - t} + a \cdot 120 \]
      15. *-commutative99.6%

        \[\leadsto \frac{\frac{\color{blue}{\left(x - y\right) \cdot 60}}{1}}{z - t} + a \cdot 120 \]
      16. associate-/l*99.6%

        \[\leadsto \frac{\color{blue}{\frac{x - y}{\frac{1}{60}}}}{z - t} + a \cdot 120 \]
      17. metadata-eval99.6%

        \[\leadsto \frac{\frac{x - y}{\color{blue}{0.016666666666666666}}}{z - t} + a \cdot 120 \]
      18. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      19. *-commutative99.7%

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

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \]
      2. times-frac99.5%

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

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    9. Taylor expanded in a around 0 79.1%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    10. Step-by-step derivation
      1. associate-*r/79.0%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. associate-/l*79.0%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    11. Simplified79.0%

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    12. Taylor expanded in x around 0 42.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+79}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-94}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 18: 52.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.14 \cdot 10^{+235} \lor \neg \left(x \leq 6.5 \cdot 10^{+142}\right):\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -1.14e+235) (not (<= x 6.5e+142)))
   (* 60.0 (/ x z))
   (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -1.14e+235) || !(x <= 6.5e+142)) {
		tmp = 60.0 * (x / z);
	} else {
		tmp = a * 120.0;
	}
	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 ((x <= (-1.14d+235)) .or. (.not. (x <= 6.5d+142))) then
        tmp = 60.0d0 * (x / z)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -1.14e+235) || !(x <= 6.5e+142)) {
		tmp = 60.0 * (x / z);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -1.14e+235) or not (x <= 6.5e+142):
		tmp = 60.0 * (x / z)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -1.14e+235) || !(x <= 6.5e+142))
		tmp = Float64(60.0 * Float64(x / z));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -1.14e+235) || ~((x <= 6.5e+142)))
		tmp = 60.0 * (x / z);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.14e+235], N[Not[LessEqual[x, 6.5e+142]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.14 \cdot 10^{+235} \lor \neg \left(x \leq 6.5 \cdot 10^{+142}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;a \cdot 120\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.14000000000000001e235 or 6.4999999999999997e142 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in x around inf 80.3%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z - t}} \]
    6. Taylor expanded in z around inf 49.6%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]

    if -1.14000000000000001e235 < x < 6.4999999999999997e142

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.14 \cdot 10^{+235} \lor \neg \left(x \leq 6.5 \cdot 10^{+142}\right):\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 19: 52.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+237}:\\ \;\;\;\;60 \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+141}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -4e+237)
   (* 60.0 (/ (- x) t))
   (if (<= x 5.8e+141) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -4e+237) {
		tmp = 60.0 * (-x / t);
	} else if (x <= 5.8e+141) {
		tmp = a * 120.0;
	} else {
		tmp = 60.0 * (x / 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 (x <= (-4d+237)) then
        tmp = 60.0d0 * (-x / t)
    else if (x <= 5.8d+141) then
        tmp = a * 120.0d0
    else
        tmp = 60.0d0 * (x / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -4e+237) {
		tmp = 60.0 * (-x / t);
	} else if (x <= 5.8e+141) {
		tmp = a * 120.0;
	} else {
		tmp = 60.0 * (x / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -4e+237:
		tmp = 60.0 * (-x / t)
	elif x <= 5.8e+141:
		tmp = a * 120.0
	else:
		tmp = 60.0 * (x / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -4e+237)
		tmp = Float64(60.0 * Float64(Float64(-x) / t));
	elseif (x <= 5.8e+141)
		tmp = Float64(a * 120.0);
	else
		tmp = Float64(60.0 * Float64(x / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -4e+237)
		tmp = 60.0 * (-x / t);
	elseif (x <= 5.8e+141)
		tmp = a * 120.0;
	else
		tmp = 60.0 * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4e+237], N[(60.0 * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+141], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+237}:\\
\;\;\;\;60 \cdot \frac{-x}{t}\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.99999999999999976e237

    1. Initial program 99.6%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in x around inf 87.4%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z - t}} \]
    6. Taylor expanded in z around 0 69.5%

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{x}{t}\right)} \]
    7. Step-by-step derivation
      1. associate-*r/69.5%

        \[\leadsto 60 \cdot \color{blue}{\frac{-1 \cdot x}{t}} \]
      2. neg-mul-169.5%

        \[\leadsto 60 \cdot \frac{\color{blue}{-x}}{t} \]
    8. Simplified69.5%

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

    if -3.99999999999999976e237 < x < 5.80000000000000013e141

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{120 \cdot a} \]

    if 5.80000000000000013e141 < x

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Taylor expanded in x around inf 76.8%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z - t}} \]
    6. Taylor expanded in z around inf 45.5%

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+237}:\\ \;\;\;\;60 \cdot \frac{-x}{t}\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+141}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \end{array} \]

Alternative 20: 50.7% accurate, 4.3× speedup?

\[\begin{array}{l} \\ a \cdot 120 \end{array} \]
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
	return a * 120.0;
}
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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return a * 120.0;
}
def code(x, y, z, t, a):
	return a * 120.0
function code(x, y, z, t, a)
	return Float64(a * 120.0)
end
function tmp = code(x, y, z, t, a)
	tmp = a * 120.0;
end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}

\\
a \cdot 120
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  5. Final simplification46.6%

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{60}{\frac{z - t}{x - y}} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a):
	return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Reproduce

?
herbie shell --seed 2023208 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

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

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