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

Percentage Accurate: 99.4% → 99.4%
Time: 14.4s
Alternatives: 21
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 21 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.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 72.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+54}:\\
\;\;\;\;\frac{60}{\frac{t}{y - x}}\\

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\

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

\mathbf{else}:\\
\;\;\;\;a \cdot \left(120 + 60 \cdot \frac{\frac{x}{a}}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2e94

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2e94 < (*.f64 a #s(literal 120 binary64)) < -4.0000000000000003e54

    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.7%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num99.7%

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    7. Applied egg-rr72.4%

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

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

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

        \[\leadsto \frac{60}{\color{blue}{\frac{-t}{x - y}}} \]
    10. Simplified72.4%

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

    if -4.0000000000000003e54 < (*.f64 a #s(literal 120 binary64)) < -5e-52

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{-60}{t}} + a \cdot 120 \]
    8. Taylor expanded in x around inf 81.0%

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

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

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

    if -5e-52 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000004e-19

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

    if 5.0000000000000004e-19 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(120 + 60 \cdot \frac{x}{a \cdot \left(z - t\right)}\right)} \]
    9. Taylor expanded in z around inf 72.7%

      \[\leadsto a \cdot \left(120 + 60 \cdot \color{blue}{\frac{x}{a \cdot z}}\right) \]
    10. Step-by-step derivation
      1. associate-/r*72.7%

        \[\leadsto a \cdot \left(120 + 60 \cdot \color{blue}{\frac{\frac{x}{a}}{z}}\right) \]
    11. Simplified72.7%

      \[\leadsto a \cdot \left(120 + 60 \cdot \color{blue}{\frac{\frac{x}{a}}{z}}\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+94}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+54}:\\ \;\;\;\;\frac{60}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-52}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-19}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(120 + 60 \cdot \frac{\frac{x}{a}}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+54}:\\
\;\;\;\;\frac{60}{\frac{t}{y - x}}\\

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2e94

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2e94 < (*.f64 a #s(literal 120 binary64)) < -4.0000000000000003e54

    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.7%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num99.7%

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    7. Applied egg-rr72.4%

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

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

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

        \[\leadsto \frac{60}{\color{blue}{\frac{-t}{x - y}}} \]
    10. Simplified72.4%

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

    if -4.0000000000000003e54 < (*.f64 a #s(literal 120 binary64)) < -5e-52

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{-60}{t}} + a \cdot 120 \]
    8. Taylor expanded in x around inf 81.0%

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

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

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

    if -5e-52 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000004e-19

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

    if 5.0000000000000004e-19 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z}} + a \cdot 120 \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+94}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+54}:\\ \;\;\;\;\frac{60}{\frac{t}{y - x}}\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-52}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-19}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot 120 \leq -6.1 \cdot 10^{-25}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2e94

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2e94 < (*.f64 a #s(literal 120 binary64)) < -9.9999999999999995e59 or -6.10000000000000018e-25 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000004e-19

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

    if -9.9999999999999995e59 < (*.f64 a #s(literal 120 binary64)) < -6.10000000000000018e-25

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]

    if 5.0000000000000004e-19 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+94}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{+60}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq -6.1 \cdot 10^{-25}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-19}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 56.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}}\\

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

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

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+177}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.4999999999999999e110

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num99.6%

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

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

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

      \[\leadsto \frac{60}{\color{blue}{-1 \cdot \frac{z - t}{y}}} \]
    9. Step-by-step derivation
      1. mul-1-neg64.4%

        \[\leadsto \frac{60}{\color{blue}{-\frac{z - t}{y}}} \]
      2. distribute-neg-frac264.4%

        \[\leadsto \frac{60}{\color{blue}{\frac{z - t}{-y}}} \]
    10. Simplified64.4%

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

    if -3.4999999999999999e110 < y < -1.70000000000000005e-120 or -2.20000000000000004e-190 < y < 1.02e177

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -1.70000000000000005e-120 < y < -2.20000000000000004e-190

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

    if 1.02e177 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+110}:\\ \;\;\;\;\frac{60}{\frac{t - z}{y}}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-120}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-190}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+177}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+110}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-120}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{+177}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.40000000000000019e110

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

    if -5.40000000000000019e110 < y < -1.99999999999999996e-120 or -3.49999999999999989e-186 < y < 3.70000000000000014e177

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -1.99999999999999996e-120 < y < -3.49999999999999989e-186

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

    if 3.70000000000000014e177 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{+110}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-120}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-186}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+177}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 55.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+112}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

\mathbf{elif}\;y \leq -1.95 \cdot 10^{-87}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+177}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.19999999999999965e112

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

    if -6.19999999999999965e112 < y < -1.9499999999999999e-87 or -3.49999999999999989e-186 < y < 1.02e177

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -1.9499999999999999e-87 < y < -3.49999999999999989e-186

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num99.8%

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    7. Applied egg-rr70.0%

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

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

    if 1.02e177 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+112}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-87}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-186}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+177}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -1 \cdot 10^{+113}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-87}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-190}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+180}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))))
   (if (<= y -1e+113)
     t_1
     (if (<= y -1.95e-87)
       (* a 120.0)
       (if (<= y -3.1e-190)
         (/ 60.0 (/ (- z t) x))
         (if (<= y 1.95e+180) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (y <= -1e+113) {
		tmp = t_1;
	} else if (y <= -1.95e-87) {
		tmp = a * 120.0;
	} else if (y <= -3.1e-190) {
		tmp = 60.0 / ((z - t) / x);
	} else if (y <= 1.95e+180) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	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) * (y / (z - t))
    if (y <= (-1d+113)) then
        tmp = t_1
    else if (y <= (-1.95d-87)) then
        tmp = a * 120.0d0
    else if (y <= (-3.1d-190)) then
        tmp = 60.0d0 / ((z - t) / x)
    else if (y <= 1.95d+180) then
        tmp = a * 120.0d0
    else
        tmp = t_1
    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 tmp;
	if (y <= -1e+113) {
		tmp = t_1;
	} else if (y <= -1.95e-87) {
		tmp = a * 120.0;
	} else if (y <= -3.1e-190) {
		tmp = 60.0 / ((z - t) / x);
	} else if (y <= 1.95e+180) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	tmp = 0
	if y <= -1e+113:
		tmp = t_1
	elif y <= -1.95e-87:
		tmp = a * 120.0
	elif y <= -3.1e-190:
		tmp = 60.0 / ((z - t) / x)
	elif y <= 1.95e+180:
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (y <= -1e+113)
		tmp = t_1;
	elseif (y <= -1.95e-87)
		tmp = Float64(a * 120.0);
	elseif (y <= -3.1e-190)
		tmp = Float64(60.0 / Float64(Float64(z - t) / x));
	elseif (y <= 1.95e+180)
		tmp = Float64(a * 120.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	tmp = 0.0;
	if (y <= -1e+113)
		tmp = t_1;
	elseif (y <= -1.95e-87)
		tmp = a * 120.0;
	elseif (y <= -3.1e-190)
		tmp = 60.0 / ((z - t) / x);
	elseif (y <= 1.95e+180)
		tmp = a * 120.0;
	else
		tmp = t_1;
	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]}, If[LessEqual[y, -1e+113], t$95$1, If[LessEqual[y, -1.95e-87], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -3.1e-190], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+180], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.95 \cdot 10^{-87}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.95 \cdot 10^{+180}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1e113 or 1.95e180 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

    if -1e113 < y < -1.9499999999999999e-87 or -3.09999999999999993e-190 < y < 1.95e180

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -1.9499999999999999e-87 < y < -3.09999999999999993e-190

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num99.8%

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    7. Applied egg-rr70.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+113}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-87}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-190}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+180}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 55.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -5 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-86}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-186}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+178}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))))
   (if (<= y -5e+111)
     t_1
     (if (<= y -2.4e-86)
       (* a 120.0)
       (if (<= y -1.75e-186)
         (* 60.0 (/ x (- z t)))
         (if (<= y 2.6e+178) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (y <= -5e+111) {
		tmp = t_1;
	} else if (y <= -2.4e-86) {
		tmp = a * 120.0;
	} else if (y <= -1.75e-186) {
		tmp = 60.0 * (x / (z - t));
	} else if (y <= 2.6e+178) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	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) * (y / (z - t))
    if (y <= (-5d+111)) then
        tmp = t_1
    else if (y <= (-2.4d-86)) then
        tmp = a * 120.0d0
    else if (y <= (-1.75d-186)) then
        tmp = 60.0d0 * (x / (z - t))
    else if (y <= 2.6d+178) then
        tmp = a * 120.0d0
    else
        tmp = t_1
    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 tmp;
	if (y <= -5e+111) {
		tmp = t_1;
	} else if (y <= -2.4e-86) {
		tmp = a * 120.0;
	} else if (y <= -1.75e-186) {
		tmp = 60.0 * (x / (z - t));
	} else if (y <= 2.6e+178) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	tmp = 0
	if y <= -5e+111:
		tmp = t_1
	elif y <= -2.4e-86:
		tmp = a * 120.0
	elif y <= -1.75e-186:
		tmp = 60.0 * (x / (z - t))
	elif y <= 2.6e+178:
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (y <= -5e+111)
		tmp = t_1;
	elseif (y <= -2.4e-86)
		tmp = Float64(a * 120.0);
	elseif (y <= -1.75e-186)
		tmp = Float64(60.0 * Float64(x / Float64(z - t)));
	elseif (y <= 2.6e+178)
		tmp = Float64(a * 120.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	tmp = 0.0;
	if (y <= -5e+111)
		tmp = t_1;
	elseif (y <= -2.4e-86)
		tmp = a * 120.0;
	elseif (y <= -1.75e-186)
		tmp = 60.0 * (x / (z - t));
	elseif (y <= 2.6e+178)
		tmp = a * 120.0;
	else
		tmp = t_1;
	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]}, If[LessEqual[y, -5e+111], t$95$1, If[LessEqual[y, -2.4e-86], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -1.75e-186], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+178], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-86}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+178}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.9999999999999997e111 or 2.6000000000000001e178 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

    if -4.9999999999999997e111 < y < -2.40000000000000013e-86 or -1.74999999999999995e-186 < y < 2.6000000000000001e178

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2.40000000000000013e-86 < y < -1.74999999999999995e-186

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+111}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-86}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-186}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+178}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-128}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;y \leq 1.82 \cdot 10^{+180}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))))
   (if (<= y -1.7e+112)
     t_1
     (if (<= y -1.9e-128)
       (* a 120.0)
       (if (<= y -5.4e-144)
         (* x (/ 60.0 z))
         (if (<= y 1.82e+180) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (y <= -1.7e+112) {
		tmp = t_1;
	} else if (y <= -1.9e-128) {
		tmp = a * 120.0;
	} else if (y <= -5.4e-144) {
		tmp = x * (60.0 / z);
	} else if (y <= 1.82e+180) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	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) * (y / (z - t))
    if (y <= (-1.7d+112)) then
        tmp = t_1
    else if (y <= (-1.9d-128)) then
        tmp = a * 120.0d0
    else if (y <= (-5.4d-144)) then
        tmp = x * (60.0d0 / z)
    else if (y <= 1.82d+180) then
        tmp = a * 120.0d0
    else
        tmp = t_1
    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 tmp;
	if (y <= -1.7e+112) {
		tmp = t_1;
	} else if (y <= -1.9e-128) {
		tmp = a * 120.0;
	} else if (y <= -5.4e-144) {
		tmp = x * (60.0 / z);
	} else if (y <= 1.82e+180) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	tmp = 0
	if y <= -1.7e+112:
		tmp = t_1
	elif y <= -1.9e-128:
		tmp = a * 120.0
	elif y <= -5.4e-144:
		tmp = x * (60.0 / z)
	elif y <= 1.82e+180:
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (y <= -1.7e+112)
		tmp = t_1;
	elseif (y <= -1.9e-128)
		tmp = Float64(a * 120.0);
	elseif (y <= -5.4e-144)
		tmp = Float64(x * Float64(60.0 / z));
	elseif (y <= 1.82e+180)
		tmp = Float64(a * 120.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	tmp = 0.0;
	if (y <= -1.7e+112)
		tmp = t_1;
	elseif (y <= -1.9e-128)
		tmp = a * 120.0;
	elseif (y <= -5.4e-144)
		tmp = x * (60.0 / z);
	elseif (y <= 1.82e+180)
		tmp = a * 120.0;
	else
		tmp = t_1;
	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]}, If[LessEqual[y, -1.7e+112], t$95$1, If[LessEqual[y, -1.9e-128], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -5.4e-144], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.82e+180], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-128}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.82 \cdot 10^{+180}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.69999999999999997e112 or 1.8199999999999999e180 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

    if -1.69999999999999997e112 < y < -1.9000000000000001e-128 or -5.3999999999999995e-144 < y < 1.8199999999999999e180

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -1.9000000000000001e-128 < y < -5.3999999999999995e-144

    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*99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-128}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;y \leq 1.82 \cdot 10^{+180}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+94} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-9}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2e94 or 2.00000000000000012e-9 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2e94 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000012e-9

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

Alternative 12: 73.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2e94

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2e94 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000004e-19

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

    if 5.0000000000000004e-19 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+94}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-19}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 89.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+59} \lor \neg \left(y \leq 7.8 \cdot 10^{+118}\right):\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.89999999999999991e59 or 7.8e118 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num90.0%

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} + a \cdot 120 \]
    7. Applied egg-rr90.2%

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

    if -2.89999999999999991e59 < y < 7.8e118

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+59} \lor \neg \left(y \leq 7.8 \cdot 10^{+118}\right):\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 89.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+62} \lor \neg \left(y \leq 4.2 \cdot 10^{+119}\right):\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.59999999999999968e62 or 4.19999999999999966e119 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num90.0%

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} + a \cdot 120 \]
    7. Applied egg-rr90.2%

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

    if -4.59999999999999968e62 < y < 4.19999999999999966e119

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+62} \lor \neg \left(y \leq 4.2 \cdot 10^{+119}\right):\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 89.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+61} \lor \neg \left(y \leq 1.25 \cdot 10^{+119}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5999999999999999e61 or 1.25e119 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

    if -7.5999999999999999e61 < y < 1.25e119

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{+61} \lor \neg \left(y \leq 1.25 \cdot 10^{+119}\right):\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 89.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+61}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5999999999999999e61

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num89.3%

        \[\leadsto -60 \cdot \color{blue}{\frac{1}{\frac{z - t}{y}}} + a \cdot 120 \]
      2. un-div-inv89.5%

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} + a \cdot 120 \]
    7. Applied egg-rr89.5%

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

    if -1.5999999999999999e61 < y < 2.6e119

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

    if 2.6e119 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+61}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+119}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 82.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+207}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y - x}}\\

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

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


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

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num99.4%

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} + a \cdot 120 \]
      2. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    7. Applied egg-rr73.4%

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

    if -6.7999999999999997e207 < x < 2.3999999999999999e117

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if 2.3999999999999999e117 < 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.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+207}:\\ \;\;\;\;\frac{60}{\frac{t - z}{y - x}}\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+117}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 99.7% accurate, 1.0× speedup?

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

\\
a \cdot 120 + \frac{60}{\frac{t - z}{y - x}}
\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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num99.7%

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

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

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

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

Alternative 19: 99.7% accurate, 1.0× speedup?

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

\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
  3. Simplified99.8%

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

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

Alternative 20: 52.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 6.9 \cdot 10^{+233}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 6.8999999999999996e233

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

    if 6.8999999999999996e233 < x

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6.9 \cdot 10^{+233}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 50.8% 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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
  3. Simplified99.8%

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification50.2%

    \[\leadsto a \cdot 120 \]
  7. Add Preprocessing

Developer target: 99.7% 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 2024103 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

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

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