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

Percentage Accurate: 99.4% → 99.8%
Time: 16.9s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 73.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.05:\\
\;\;\;\;a \cdot 120 - 60 \cdot \frac{x}{t}\\

\mathbf{elif}\;a \cdot 120 \leq 200000000:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

\mathbf{elif}\;a \cdot 120 \leq 10^{+73}:\\
\;\;\;\;a \cdot 120 - x \cdot \frac{-60}{z}\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{x - y}{\color{blue}{t \cdot 0.016666666666666666}}\right) + a \cdot 120 \]
    7. Taylor expanded in y around 0 81.2%

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

    if -0.050000000000000003 < (*.f64 a 120) < 2e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
      3. associate-/r/76.3%

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

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

    if 2e8 < (*.f64 a 120) < 9.99999999999999983e72

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.9%

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

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

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

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

        \[\leadsto a \cdot 120 - \color{blue}{\frac{-60}{z} \cdot x} \]
      3. *-commutative93.6%

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

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

    if 9.99999999999999983e72 < (*.f64 a 120)

    1. Initial program 99.9%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in x around 0 95.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} + a \cdot 120 \]
      2. metadata-eval84.2%

        \[\leadsto \frac{\color{blue}{\left(--60\right)} \cdot y}{t} + a \cdot 120 \]
      3. distribute-lft-neg-in84.2%

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

        \[\leadsto \frac{-\color{blue}{y \cdot -60}}{t} + a \cdot 120 \]
      5. distribute-neg-frac84.2%

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

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

        \[\leadsto \color{blue}{y \cdot \left(-\frac{-60}{t}\right)} + a \cdot 120 \]
      8. distribute-neg-frac84.2%

        \[\leadsto y \cdot \color{blue}{\frac{--60}{t}} + a \cdot 120 \]
      9. metadata-eval84.2%

        \[\leadsto y \cdot \frac{\color{blue}{60}}{t} + a \cdot 120 \]
    7. Simplified84.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -0.05:\\ \;\;\;\;a \cdot 120 - 60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 200000000:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;a \cdot 120 \leq 10^{+73}:\\ \;\;\;\;a \cdot 120 - x \cdot \frac{-60}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\ \end{array} \]

Alternative 3: 73.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.05:\\
\;\;\;\;a \cdot 120 - 60 \cdot \frac{x}{t}\\

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

\mathbf{elif}\;a \cdot 120 \leq 10^{+73}:\\
\;\;\;\;a \cdot 120 - x \cdot \frac{-60}{z}\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{x - y}{\color{blue}{t \cdot 0.016666666666666666}}\right) + a \cdot 120 \]
    7. Taylor expanded in y around 0 81.2%

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

    if -0.050000000000000003 < (*.f64 a 120) < 2e8

    1. Initial program 99.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.7%

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} \]
      2. un-div-inv76.3%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    8. Applied egg-rr76.3%

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

    if 2e8 < (*.f64 a 120) < 9.99999999999999983e72

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.9%

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

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

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

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

        \[\leadsto a \cdot 120 - \color{blue}{\frac{-60}{z} \cdot x} \]
      3. *-commutative93.6%

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

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

    if 9.99999999999999983e72 < (*.f64 a 120)

    1. Initial program 99.9%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in x around 0 95.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} + a \cdot 120 \]
      2. metadata-eval84.2%

        \[\leadsto \frac{\color{blue}{\left(--60\right)} \cdot y}{t} + a \cdot 120 \]
      3. distribute-lft-neg-in84.2%

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

        \[\leadsto \frac{-\color{blue}{y \cdot -60}}{t} + a \cdot 120 \]
      5. distribute-neg-frac84.2%

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

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

        \[\leadsto \color{blue}{y \cdot \left(-\frac{-60}{t}\right)} + a \cdot 120 \]
      8. distribute-neg-frac84.2%

        \[\leadsto y \cdot \color{blue}{\frac{--60}{t}} + a \cdot 120 \]
      9. metadata-eval84.2%

        \[\leadsto y \cdot \frac{\color{blue}{60}}{t} + a \cdot 120 \]
    7. Simplified84.2%

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

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

Alternative 4: 58.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{x - y}{t}\\ t_2 := 60 \cdot \frac{x - y}{z}\\ \mathbf{if}\;a \leq -8.4 \cdot 10^{-10}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-271}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-168}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 900:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ (- x y) t))) (t_2 (* 60.0 (/ (- x y) z))))
   (if (<= a -8.4e-10)
     (* a 120.0)
     (if (<= a -1.85e-271)
       t_2
       (if (<= a 3.8e-205)
         t_1
         (if (<= a 6e-168)
           t_2
           (if (<= a 4.2e-55) t_1 (if (<= a 900.0) t_2 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * ((x - y) / t);
	double t_2 = 60.0 * ((x - y) / z);
	double tmp;
	if (a <= -8.4e-10) {
		tmp = a * 120.0;
	} else if (a <= -1.85e-271) {
		tmp = t_2;
	} else if (a <= 3.8e-205) {
		tmp = t_1;
	} else if (a <= 6e-168) {
		tmp = t_2;
	} else if (a <= 4.2e-55) {
		tmp = t_1;
	} else if (a <= 900.0) {
		tmp = t_2;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-60.0d0) * ((x - y) / t)
    t_2 = 60.0d0 * ((x - y) / z)
    if (a <= (-8.4d-10)) then
        tmp = a * 120.0d0
    else if (a <= (-1.85d-271)) then
        tmp = t_2
    else if (a <= 3.8d-205) then
        tmp = t_1
    else if (a <= 6d-168) then
        tmp = t_2
    else if (a <= 4.2d-55) then
        tmp = t_1
    else if (a <= 900.0d0) then
        tmp = t_2
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * ((x - y) / t);
	double t_2 = 60.0 * ((x - y) / z);
	double tmp;
	if (a <= -8.4e-10) {
		tmp = a * 120.0;
	} else if (a <= -1.85e-271) {
		tmp = t_2;
	} else if (a <= 3.8e-205) {
		tmp = t_1;
	} else if (a <= 6e-168) {
		tmp = t_2;
	} else if (a <= 4.2e-55) {
		tmp = t_1;
	} else if (a <= 900.0) {
		tmp = t_2;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * ((x - y) / t)
	t_2 = 60.0 * ((x - y) / z)
	tmp = 0
	if a <= -8.4e-10:
		tmp = a * 120.0
	elif a <= -1.85e-271:
		tmp = t_2
	elif a <= 3.8e-205:
		tmp = t_1
	elif a <= 6e-168:
		tmp = t_2
	elif a <= 4.2e-55:
		tmp = t_1
	elif a <= 900.0:
		tmp = t_2
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(Float64(x - y) / t))
	t_2 = Float64(60.0 * Float64(Float64(x - y) / z))
	tmp = 0.0
	if (a <= -8.4e-10)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.85e-271)
		tmp = t_2;
	elseif (a <= 3.8e-205)
		tmp = t_1;
	elseif (a <= 6e-168)
		tmp = t_2;
	elseif (a <= 4.2e-55)
		tmp = t_1;
	elseif (a <= 900.0)
		tmp = t_2;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * ((x - y) / t);
	t_2 = 60.0 * ((x - y) / z);
	tmp = 0.0;
	if (a <= -8.4e-10)
		tmp = a * 120.0;
	elseif (a <= -1.85e-271)
		tmp = t_2;
	elseif (a <= 3.8e-205)
		tmp = t_1;
	elseif (a <= 6e-168)
		tmp = t_2;
	elseif (a <= 4.2e-55)
		tmp = t_1;
	elseif (a <= 900.0)
		tmp = t_2;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.4e-10], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.85e-271], t$95$2, If[LessEqual[a, 3.8e-205], t$95$1, If[LessEqual[a, 6e-168], t$95$2, If[LessEqual[a, 4.2e-55], t$95$1, If[LessEqual[a, 900.0], t$95$2, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.85 \cdot 10^{-271}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-205}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-168}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-55}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 900:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.3999999999999999e-10 or 900 < a

    1. Initial program 99.9%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 79.5%

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

    if -8.3999999999999999e-10 < a < -1.85000000000000011e-271 or 3.79999999999999992e-205 < a < 5.99999999999999983e-168 or 4.2000000000000003e-55 < a < 900

    1. Initial program 99.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.7%

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

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

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

    if -1.85000000000000011e-271 < a < 3.79999999999999992e-205 or 5.99999999999999983e-168 < a < 4.2000000000000003e-55

    1. Initial program 99.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.4 \cdot 10^{-10}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-271}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-205}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-168}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-55}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 900:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 73.9% accurate, 0.7× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.8500000000000001e62 or 4.19999999999999977e-48 < t

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around 0 88.2%

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

    if -3.8500000000000001e62 < t < -3.7e-136

    1. Initial program 99.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.7%

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} \]
      2. un-div-inv73.9%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    8. Applied egg-rr73.9%

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

    if -3.7e-136 < t < 1.1499999999999999e-225

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

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

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

        \[\leadsto a \cdot 120 - \color{blue}{\frac{-60}{z} \cdot x} \]
      3. *-commutative76.6%

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

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

    if 1.1499999999999999e-225 < t < 4.19999999999999977e-48

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

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

        \[\leadsto a \cdot 120 - \color{blue}{\frac{60 \cdot y}{z}} \]
    9. Simplified81.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.85 \cdot 10^{+62}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-136}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-225}:\\ \;\;\;\;a \cdot 120 - x \cdot \frac{-60}{z}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-48}:\\ \;\;\;\;a \cdot 120 - \frac{60 \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 6: 83.1% accurate, 0.8× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.5999999999999994e-135 or 2.5e119 < z

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 85.2%

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

    if -9.5999999999999994e-135 < z < 1.00000000000000001e-35

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around 0 90.7%

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

    if 1.00000000000000001e-35 < z < 2.5e119

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in x around 0 82.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.6 \cdot 10^{-135}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;z \leq 10^{-35}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+119}:\\ \;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \end{array} \]

Alternative 7: 75.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.05 \lor \neg \left(a \cdot 120 \leq 200000000\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -0.050000000000000003 or 2e8 < (*.f64 a 120)

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 80.1%

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

    if -0.050000000000000003 < (*.f64 a 120) < 2e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
      3. associate-/r/76.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -0.05 \lor \neg \left(a \cdot 120 \leq 200000000\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \end{array} \]

Alternative 8: 74.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -0.05:\\ \;\;\;\;a \cdot 120 - 60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 200000000:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* a 120.0) -0.05)
   (- (* a 120.0) (* 60.0 (/ x t)))
   (if (<= (* a 120.0) 200000000.0) (* (/ 60.0 (- z t)) (- x y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -0.05) {
		tmp = (a * 120.0) - (60.0 * (x / t));
	} else if ((a * 120.0) <= 200000000.0) {
		tmp = (60.0 / (z - t)) * (x - y);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a * 120.0d0) <= (-0.05d0)) then
        tmp = (a * 120.0d0) - (60.0d0 * (x / t))
    else if ((a * 120.0d0) <= 200000000.0d0) then
        tmp = (60.0d0 / (z - t)) * (x - y)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -0.05) {
		tmp = (a * 120.0) - (60.0 * (x / t));
	} else if ((a * 120.0) <= 200000000.0) {
		tmp = (60.0 / (z - t)) * (x - y);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a * 120.0) <= -0.05:
		tmp = (a * 120.0) - (60.0 * (x / t))
	elif (a * 120.0) <= 200000000.0:
		tmp = (60.0 / (z - t)) * (x - y)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(a * 120.0) <= -0.05)
		tmp = Float64(Float64(a * 120.0) - Float64(60.0 * Float64(x / t)));
	elseif (Float64(a * 120.0) <= 200000000.0)
		tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a * 120.0) <= -0.05)
		tmp = (a * 120.0) - (60.0 * (x / t));
	elseif ((a * 120.0) <= 200000000.0)
		tmp = (60.0 / (z - t)) * (x - y);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.05], N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 200000000.0], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.05:\\
\;\;\;\;a \cdot 120 - 60 \cdot \frac{x}{t}\\

\mathbf{elif}\;a \cdot 120 \leq 200000000:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{x - y}{\color{blue}{t \cdot 0.016666666666666666}}\right) + a \cdot 120 \]
    7. Taylor expanded in y around 0 81.2%

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

    if -0.050000000000000003 < (*.f64 a 120) < 2e8

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
      3. associate-/r/76.3%

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

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

    if 2e8 < (*.f64 a 120)

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 79.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -0.05:\\ \;\;\;\;a \cdot 120 - 60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 200000000:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 9: 57.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq 35000:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+200}:\\ \;\;\;\;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 -4.4e+112)
     t_1
     (if (<= y 7.2e-46)
       (* a 120.0)
       (if (<= y 35000.0)
         (* (/ 60.0 (- z t)) x)
         (if (<= y 4.6e+200) (* 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 <= -4.4e+112) {
		tmp = t_1;
	} else if (y <= 7.2e-46) {
		tmp = a * 120.0;
	} else if (y <= 35000.0) {
		tmp = (60.0 / (z - t)) * x;
	} else if (y <= 4.6e+200) {
		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 <= (-4.4d+112)) then
        tmp = t_1
    else if (y <= 7.2d-46) then
        tmp = a * 120.0d0
    else if (y <= 35000.0d0) then
        tmp = (60.0d0 / (z - t)) * x
    else if (y <= 4.6d+200) 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 <= -4.4e+112) {
		tmp = t_1;
	} else if (y <= 7.2e-46) {
		tmp = a * 120.0;
	} else if (y <= 35000.0) {
		tmp = (60.0 / (z - t)) * x;
	} else if (y <= 4.6e+200) {
		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 <= -4.4e+112:
		tmp = t_1
	elif y <= 7.2e-46:
		tmp = a * 120.0
	elif y <= 35000.0:
		tmp = (60.0 / (z - t)) * x
	elif y <= 4.6e+200:
		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 <= -4.4e+112)
		tmp = t_1;
	elseif (y <= 7.2e-46)
		tmp = Float64(a * 120.0);
	elseif (y <= 35000.0)
		tmp = Float64(Float64(60.0 / Float64(z - t)) * x);
	elseif (y <= 4.6e+200)
		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 <= -4.4e+112)
		tmp = t_1;
	elseif (y <= 7.2e-46)
		tmp = a * 120.0;
	elseif (y <= 35000.0)
		tmp = (60.0 / (z - t)) * x;
	elseif (y <= 4.6e+200)
		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, -4.4e+112], t$95$1, If[LessEqual[y, 7.2e-46], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 35000.0], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 4.6e+200], 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 -4.4 \cdot 10^{+112}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq 4.6 \cdot 10^{+200}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.3999999999999999e112 or 4.60000000000000006e200 < y

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

        \[\leadsto \color{blue}{\frac{y}{z - t} \cdot -60} \]
    8. Simplified65.8%

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

    if -4.3999999999999999e112 < y < 7.2e-46 or 35000 < y < 4.60000000000000006e200

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 62.5%

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

    if 7.2e-46 < y < 35000

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot 120 - \left(x - y\right) \cdot \frac{\color{blue}{-60}}{z - t} \]
    5. Applied egg-rr99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x}}} \]
      2. associate-/r/74.5%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} \]
    10. Applied egg-rr74.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+112}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq 35000:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+200}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 10: 80.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{-135} \lor \neg \left(z \leq 2.35 \cdot 10^{+119}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.5999999999999994e-135 or 2.35000000000000004e119 < z

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 85.2%

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

    if -9.5999999999999994e-135 < z < 2.35000000000000004e119

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around 0 85.4%

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

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

Alternative 11: 89.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.52e78 or 145000 < x

    1. Initial program 99.6%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in x around inf 89.1%

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

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

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

    if -1.52e78 < x < 145000

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in x around 0 95.9%

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

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

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

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

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

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

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

Alternative 12: 75.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-9} \lor \neg \left(a \leq 600000000\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 -1.35e-9) (not (<= a 600000000.0)))
   (* 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 <= -1.35e-9) || !(a <= 600000000.0)) {
		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 <= (-1.35d-9)) .or. (.not. (a <= 600000000.0d0))) 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 <= -1.35e-9) || !(a <= 600000000.0)) {
		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 <= -1.35e-9) or not (a <= 600000000.0):
		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 ((a <= -1.35e-9) || !(a <= 600000000.0))
		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 <= -1.35e-9) || ~((a <= 600000000.0)))
		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[a, -1.35e-9], N[Not[LessEqual[a, 600000000.0]], $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 \leq -1.35 \cdot 10^{-9} \lor \neg \left(a \leq 600000000\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 a < -1.3500000000000001e-9 or 6e8 < a

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 80.1%

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

    if -1.3500000000000001e-9 < a < 6e8

    1. Initial program 99.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.7%

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

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

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

Alternative 13: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{60}{z - t} \cdot \left(x - y\right) + 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(Float64(60.0 / 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

Alternative 14: 58.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.55 \cdot 10^{-114} \lor \neg \left(a \leq 950000\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55e-114 or 9.5e5 < a

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 74.2%

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

    if -1.55e-114 < a < 9.5e5

    1. Initial program 99.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{-114} \lor \neg \left(a \leq 950000\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 15: 52.4% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Taylor expanded in z around inf 53.4%

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

    if 1.0000000000000001e243 < x

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{+243}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]

Alternative 16: 51.4% 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.7%

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Taylor expanded in z around inf 51.5%

    \[\leadsto \color{blue}{120 \cdot a} \]
  3. Final simplification51.5%

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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