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

Percentage Accurate: 99.6% → 99.8%
Time: 15.7s
Alternatives: 21
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 99.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

Alternative 2: 70.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-234}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-48}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+110}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{-t}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* a 120.0) -2e+76)
   (* a 120.0)
   (if (<= (* a 120.0) 5e-234)
     (* 60.0 (/ (- x y) (- z t)))
     (if (<= (* a 120.0) 4e-210)
       (* a 120.0)
       (if (<= (* a 120.0) 1e-48)
         (/ (* 60.0 (- x y)) (- z t))
         (if (<= (* a 120.0) 2e-18)
           (+ (* a 120.0) (* x (/ -60.0 t)))
           (if (<= (* a 120.0) 2e+23)
             (+ (* a 120.0) (* 60.0 (/ y t)))
             (if (<= (* a 120.0) 2e+110)
               (* a 120.0)
               (+ (* a 120.0) (/ -60.0 (/ (- t) y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -2e+76) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 5e-234) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if ((a * 120.0) <= 4e-210) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 1e-48) {
		tmp = (60.0 * (x - y)) / (z - t);
	} else if ((a * 120.0) <= 2e-18) {
		tmp = (a * 120.0) + (x * (-60.0 / t));
	} else if ((a * 120.0) <= 2e+23) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if ((a * 120.0) <= 2e+110) {
		tmp = a * 120.0;
	} else {
		tmp = (a * 120.0) + (-60.0 / (-t / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a * 120.0d0) <= (-2d+76)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= 5d-234) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else if ((a * 120.0d0) <= 4d-210) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= 1d-48) then
        tmp = (60.0d0 * (x - y)) / (z - t)
    else if ((a * 120.0d0) <= 2d-18) then
        tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
    else if ((a * 120.0d0) <= 2d+23) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if ((a * 120.0d0) <= 2d+110) then
        tmp = a * 120.0d0
    else
        tmp = (a * 120.0d0) + ((-60.0d0) / (-t / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -2e+76) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 5e-234) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if ((a * 120.0) <= 4e-210) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 1e-48) {
		tmp = (60.0 * (x - y)) / (z - t);
	} else if ((a * 120.0) <= 2e-18) {
		tmp = (a * 120.0) + (x * (-60.0 / t));
	} else if ((a * 120.0) <= 2e+23) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if ((a * 120.0) <= 2e+110) {
		tmp = a * 120.0;
	} else {
		tmp = (a * 120.0) + (-60.0 / (-t / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a * 120.0) <= -2e+76:
		tmp = a * 120.0
	elif (a * 120.0) <= 5e-234:
		tmp = 60.0 * ((x - y) / (z - t))
	elif (a * 120.0) <= 4e-210:
		tmp = a * 120.0
	elif (a * 120.0) <= 1e-48:
		tmp = (60.0 * (x - y)) / (z - t)
	elif (a * 120.0) <= 2e-18:
		tmp = (a * 120.0) + (x * (-60.0 / t))
	elif (a * 120.0) <= 2e+23:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif (a * 120.0) <= 2e+110:
		tmp = a * 120.0
	else:
		tmp = (a * 120.0) + (-60.0 / (-t / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(a * 120.0) <= -2e+76)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= 5e-234)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	elseif (Float64(a * 120.0) <= 4e-210)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= 1e-48)
		tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t));
	elseif (Float64(a * 120.0) <= 2e-18)
		tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t)));
	elseif (Float64(a * 120.0) <= 2e+23)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (Float64(a * 120.0) <= 2e+110)
		tmp = Float64(a * 120.0);
	else
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(-t) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a * 120.0) <= -2e+76)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= 5e-234)
		tmp = 60.0 * ((x - y) / (z - t));
	elseif ((a * 120.0) <= 4e-210)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= 1e-48)
		tmp = (60.0 * (x - y)) / (z - t);
	elseif ((a * 120.0) <= 2e-18)
		tmp = (a * 120.0) + (x * (-60.0 / t));
	elseif ((a * 120.0) <= 2e+23)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif ((a * 120.0) <= 2e+110)
		tmp = a * 120.0;
	else
		tmp = (a * 120.0) + (-60.0 / (-t / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+76], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-234], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-210], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-48], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-18], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+23], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+110], N[(a * 120.0), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[((-t) / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\
\;\;\;\;a \cdot 120\\

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

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+110}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 a 120) < -2.0000000000000001e76 or 4.99999999999999979e-234 < (*.f64 a 120) < 4.0000000000000002e-210 or 1.9999999999999998e23 < (*.f64 a 120) < 2e110

    1. Initial program 100.0%

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

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

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

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

    if -2.0000000000000001e76 < (*.f64 a 120) < 4.99999999999999979e-234

    1. Initial program 99.7%

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

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

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

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

    if 4.0000000000000002e-210 < (*.f64 a 120) < 9.9999999999999997e-49

    1. Initial program 99.6%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef23.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    6. Applied egg-rr23.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def41.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p77.1%

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

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

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

    if 9.9999999999999997e-49 < (*.f64 a 120) < 2.0000000000000001e-18

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-18 < (*.f64 a 120) < 1.9999999999999998e23

    1. Initial program 100.0%

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

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

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

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

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

    if 2e110 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \frac{-60}{\color{blue}{-1 \cdot \frac{t}{y}}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. neg-mul-187.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-234}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-48}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+110}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{-t}{y}}\\ \end{array} \]

Alternative 3: 70.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{+110}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= (* a 120.0) -2e+76)
     (* a 120.0)
     (if (<= (* a 120.0) 5e-234)
       t_1
       (if (<= (* a 120.0) 4e-210)
         (* a 120.0)
         (if (<= (* a 120.0) 1e-49)
           t_1
           (if (<= (* a 120.0) 2e-18)
             (+ (* a 120.0) (* x (/ -60.0 t)))
             (if (or (<= (* a 120.0) 2e+23) (not (<= (* a 120.0) 2e+110)))
               (+ (* a 120.0) (* 60.0 (/ y t)))
               (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if ((a * 120.0) <= -2e+76) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 5e-234) {
		tmp = t_1;
	} else if ((a * 120.0) <= 4e-210) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 1e-49) {
		tmp = t_1;
	} else if ((a * 120.0) <= 2e-18) {
		tmp = (a * 120.0) + (x * (-60.0 / t));
	} else if (((a * 120.0) <= 2e+23) || !((a * 120.0) <= 2e+110)) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if ((a * 120.0d0) <= (-2d+76)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= 5d-234) then
        tmp = t_1
    else if ((a * 120.0d0) <= 4d-210) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= 1d-49) then
        tmp = t_1
    else if ((a * 120.0d0) <= 2d-18) then
        tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
    else if (((a * 120.0d0) <= 2d+23) .or. (.not. ((a * 120.0d0) <= 2d+110))) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if ((a * 120.0) <= -2e+76) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 5e-234) {
		tmp = t_1;
	} else if ((a * 120.0) <= 4e-210) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 1e-49) {
		tmp = t_1;
	} else if ((a * 120.0) <= 2e-18) {
		tmp = (a * 120.0) + (x * (-60.0 / t));
	} else if (((a * 120.0) <= 2e+23) || !((a * 120.0) <= 2e+110)) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if (a * 120.0) <= -2e+76:
		tmp = a * 120.0
	elif (a * 120.0) <= 5e-234:
		tmp = t_1
	elif (a * 120.0) <= 4e-210:
		tmp = a * 120.0
	elif (a * 120.0) <= 1e-49:
		tmp = t_1
	elif (a * 120.0) <= 2e-18:
		tmp = (a * 120.0) + (x * (-60.0 / t))
	elif ((a * 120.0) <= 2e+23) or not ((a * 120.0) <= 2e+110):
		tmp = (a * 120.0) + (60.0 * (y / t))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -2e+76)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= 5e-234)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 4e-210)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= 1e-49)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 2e-18)
		tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t)));
	elseif ((Float64(a * 120.0) <= 2e+23) || !(Float64(a * 120.0) <= 2e+110))
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / (z - t));
	tmp = 0.0;
	if ((a * 120.0) <= -2e+76)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= 5e-234)
		tmp = t_1;
	elseif ((a * 120.0) <= 4e-210)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= 1e-49)
		tmp = t_1;
	elseif ((a * 120.0) <= 2e-18)
		tmp = (a * 120.0) + (x * (-60.0 / t));
	elseif (((a * 120.0) <= 2e+23) || ~(((a * 120.0) <= 2e+110)))
		tmp = (a * 120.0) + (60.0 * (y / t));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+76], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-234], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-210], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-49], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-18], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+23], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+110]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \cdot 120 \leq 10^{-49}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{+110}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2.0000000000000001e76 or 4.99999999999999979e-234 < (*.f64 a 120) < 4.0000000000000002e-210 or 1.9999999999999998e23 < (*.f64 a 120) < 2e110

    1. Initial program 100.0%

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

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

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

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

    if -2.0000000000000001e76 < (*.f64 a 120) < 4.99999999999999979e-234 or 4.0000000000000002e-210 < (*.f64 a 120) < 9.99999999999999936e-50

    1. Initial program 99.7%

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

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

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

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

    if 9.99999999999999936e-50 < (*.f64 a 120) < 2.0000000000000001e-18

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-18 < (*.f64 a 120) < 1.9999999999999998e23 or 2e110 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-234}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-49}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{+110}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 4: 70.2% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\
\;\;\;\;a \cdot 120\\

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

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{+110}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a 120) < -2.0000000000000001e76 or 4.99999999999999979e-234 < (*.f64 a 120) < 4.0000000000000002e-210 or 1.9999999999999998e23 < (*.f64 a 120) < 2e110

    1. Initial program 100.0%

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

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

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

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

    if -2.0000000000000001e76 < (*.f64 a 120) < 4.99999999999999979e-234

    1. Initial program 99.7%

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

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

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

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

    if 4.0000000000000002e-210 < (*.f64 a 120) < 9.9999999999999997e-49

    1. Initial program 99.6%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef23.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    6. Applied egg-rr23.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def41.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p77.1%

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

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

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

    if 9.9999999999999997e-49 < (*.f64 a 120) < 2.0000000000000001e-18

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-18 < (*.f64 a 120) < 1.9999999999999998e23 or 2e110 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-234}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-210}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-48}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{+110}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 83.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+87}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -9.9999999999999996e86

    1. Initial program 99.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Step-by-step derivation
      1. expm1-log1p-u0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef0.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    6. Applied egg-rr0.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p82.2%

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

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

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

    if -9.9999999999999996e86 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1e115

    1. Initial program 99.8%

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

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

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

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

    if 1e115 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.6%

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

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

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

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

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

Alternative 6: 70.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-17}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+21} \lor \neg \left(a \leq 3.8 \cdot 10^{+110}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= a -7.8e+68)
     (* a 120.0)
     (if (<= a 6.6e-231)
       t_1
       (if (<= a 1.8e-212)
         (* a 120.0)
         (if (<= a 2.1e-51)
           t_1
           (if (<= a 9.2e-17)
             (+ (* a 120.0) (* -60.0 (/ x t)))
             (if (or (<= a 3.5e+21) (not (<= a 3.8e+110)))
               (+ (* a 120.0) (* 60.0 (/ y t)))
               (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= 6.6e-231) {
		tmp = t_1;
	} else if (a <= 1.8e-212) {
		tmp = a * 120.0;
	} else if (a <= 2.1e-51) {
		tmp = t_1;
	} else if (a <= 9.2e-17) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a <= 3.5e+21) || !(a <= 3.8e+110)) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if (a <= (-7.8d+68)) then
        tmp = a * 120.0d0
    else if (a <= 6.6d-231) then
        tmp = t_1
    else if (a <= 1.8d-212) then
        tmp = a * 120.0d0
    else if (a <= 2.1d-51) then
        tmp = t_1
    else if (a <= 9.2d-17) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    else if ((a <= 3.5d+21) .or. (.not. (a <= 3.8d+110))) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= 6.6e-231) {
		tmp = t_1;
	} else if (a <= 1.8e-212) {
		tmp = a * 120.0;
	} else if (a <= 2.1e-51) {
		tmp = t_1;
	} else if (a <= 9.2e-17) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a <= 3.5e+21) || !(a <= 3.8e+110)) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if a <= -7.8e+68:
		tmp = a * 120.0
	elif a <= 6.6e-231:
		tmp = t_1
	elif a <= 1.8e-212:
		tmp = a * 120.0
	elif a <= 2.1e-51:
		tmp = t_1
	elif a <= 9.2e-17:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	elif (a <= 3.5e+21) or not (a <= 3.8e+110):
		tmp = (a * 120.0) + (60.0 * (y / t))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))
	tmp = 0.0
	if (a <= -7.8e+68)
		tmp = Float64(a * 120.0);
	elseif (a <= 6.6e-231)
		tmp = t_1;
	elseif (a <= 1.8e-212)
		tmp = Float64(a * 120.0);
	elseif (a <= 2.1e-51)
		tmp = t_1;
	elseif (a <= 9.2e-17)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	elseif ((a <= 3.5e+21) || !(a <= 3.8e+110))
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / (z - t));
	tmp = 0.0;
	if (a <= -7.8e+68)
		tmp = a * 120.0;
	elseif (a <= 6.6e-231)
		tmp = t_1;
	elseif (a <= 1.8e-212)
		tmp = a * 120.0;
	elseif (a <= 2.1e-51)
		tmp = t_1;
	elseif (a <= 9.2e-17)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	elseif ((a <= 3.5e+21) || ~((a <= 3.8e+110)))
		tmp = (a * 120.0) + (60.0 * (y / t));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e+68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 6.6e-231], t$95$1, If[LessEqual[a, 1.8e-212], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.1e-51], t$95$1, If[LessEqual[a, 9.2e-17], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 3.5e+21], N[Not[LessEqual[a, 3.8e+110]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+21} \lor \neg \left(a \leq 3.8 \cdot 10^{+110}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.80000000000000037e68 or 6.60000000000000056e-231 < a < 1.8e-212 or 3.5e21 < a < 3.79999999999999989e110

    1. Initial program 100.0%

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

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

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

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

    if -7.80000000000000037e68 < a < 6.60000000000000056e-231 or 1.8e-212 < a < 2.10000000000000002e-51

    1. Initial program 99.7%

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

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

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

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

    if 2.10000000000000002e-51 < a < 9.20000000000000035e-17

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if 9.20000000000000035e-17 < a < 3.5e21 or 3.79999999999999989e110 < a

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-51}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-17}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+21} \lor \neg \left(a \leq 3.8 \cdot 10^{+110}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 7: 71.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{+70}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= a -1.75e+70)
     (* a 120.0)
     (if (<= a 6.6e-231)
       t_1
       (if (<= a 1.8e-212)
         (* a 120.0)
         (if (<= a 4.5e-51)
           t_1
           (if (<= a 5.3e-18)
             (+ (* a 120.0) (* -60.0 (/ x t)))
             (if (<= a 1.85e+21) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (a <= -1.75e+70) {
		tmp = a * 120.0;
	} else if (a <= 6.6e-231) {
		tmp = t_1;
	} else if (a <= 1.8e-212) {
		tmp = a * 120.0;
	} else if (a <= 4.5e-51) {
		tmp = t_1;
	} else if (a <= 5.3e-18) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if (a <= 1.85e+21) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if (a <= (-1.75d+70)) then
        tmp = a * 120.0d0
    else if (a <= 6.6d-231) then
        tmp = t_1
    else if (a <= 1.8d-212) then
        tmp = a * 120.0d0
    else if (a <= 4.5d-51) then
        tmp = t_1
    else if (a <= 5.3d-18) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    else if (a <= 1.85d+21) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (a <= -1.75e+70) {
		tmp = a * 120.0;
	} else if (a <= 6.6e-231) {
		tmp = t_1;
	} else if (a <= 1.8e-212) {
		tmp = a * 120.0;
	} else if (a <= 4.5e-51) {
		tmp = t_1;
	} else if (a <= 5.3e-18) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if (a <= 1.85e+21) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if a <= -1.75e+70:
		tmp = a * 120.0
	elif a <= 6.6e-231:
		tmp = t_1
	elif a <= 1.8e-212:
		tmp = a * 120.0
	elif a <= 4.5e-51:
		tmp = t_1
	elif a <= 5.3e-18:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	elif a <= 1.85e+21:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))
	tmp = 0.0
	if (a <= -1.75e+70)
		tmp = Float64(a * 120.0);
	elseif (a <= 6.6e-231)
		tmp = t_1;
	elseif (a <= 1.8e-212)
		tmp = Float64(a * 120.0);
	elseif (a <= 4.5e-51)
		tmp = t_1;
	elseif (a <= 5.3e-18)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	elseif (a <= 1.85e+21)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / (z - t));
	tmp = 0.0;
	if (a <= -1.75e+70)
		tmp = a * 120.0;
	elseif (a <= 6.6e-231)
		tmp = t_1;
	elseif (a <= 1.8e-212)
		tmp = a * 120.0;
	elseif (a <= 4.5e-51)
		tmp = t_1;
	elseif (a <= 5.3e-18)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	elseif (a <= 1.85e+21)
		tmp = t_1;
	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] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e+70], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 6.6e-231], t$95$1, If[LessEqual[a, 1.8e-212], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.5e-51], t$95$1, If[LessEqual[a, 5.3e-18], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+21], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.75000000000000001e70 or 6.60000000000000056e-231 < a < 1.8e-212 or 1.85e21 < a

    1. Initial program 99.9%

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

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

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

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

    if -1.75000000000000001e70 < a < 6.60000000000000056e-231 or 1.8e-212 < a < 4.49999999999999974e-51 or 5.3000000000000003e-18 < a < 1.85e21

    1. Initial program 99.7%

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

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

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

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

    if 4.49999999999999974e-51 < a < 5.3000000000000003e-18

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+70}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-51}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+21}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 8: 53.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{60}{z - t}\\ \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.18 \cdot 10^{-45}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-162} \lor \neg \left(a \leq 4.5 \cdot 10^{-47}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ 60.0 (- z t)))))
   (if (<= a -7.8e+68)
     (* a 120.0)
     (if (<= a -1.18e-45)
       (* 60.0 (/ (- x y) z))
       (if (<= a 3.05e-291)
         t_1
         (if (<= a 6.6e-231)
           (* -60.0 (/ y (- z t)))
           (if (or (<= a 8e-162) (not (<= a 4.5e-47))) (* a 120.0) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (60.0 / (z - t));
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= -1.18e-45) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 3.05e-291) {
		tmp = t_1;
	} else if (a <= 6.6e-231) {
		tmp = -60.0 * (y / (z - t));
	} else if ((a <= 8e-162) || !(a <= 4.5e-47)) {
		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 = x * (60.0d0 / (z - t))
    if (a <= (-7.8d+68)) then
        tmp = a * 120.0d0
    else if (a <= (-1.18d-45)) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (a <= 3.05d-291) then
        tmp = t_1
    else if (a <= 6.6d-231) then
        tmp = (-60.0d0) * (y / (z - t))
    else if ((a <= 8d-162) .or. (.not. (a <= 4.5d-47))) 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 = x * (60.0 / (z - t));
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= -1.18e-45) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 3.05e-291) {
		tmp = t_1;
	} else if (a <= 6.6e-231) {
		tmp = -60.0 * (y / (z - t));
	} else if ((a <= 8e-162) || !(a <= 4.5e-47)) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (60.0 / (z - t))
	tmp = 0
	if a <= -7.8e+68:
		tmp = a * 120.0
	elif a <= -1.18e-45:
		tmp = 60.0 * ((x - y) / z)
	elif a <= 3.05e-291:
		tmp = t_1
	elif a <= 6.6e-231:
		tmp = -60.0 * (y / (z - t))
	elif (a <= 8e-162) or not (a <= 4.5e-47):
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(60.0 / Float64(z - t)))
	tmp = 0.0
	if (a <= -7.8e+68)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.18e-45)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (a <= 3.05e-291)
		tmp = t_1;
	elseif (a <= 6.6e-231)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	elseif ((a <= 8e-162) || !(a <= 4.5e-47))
		tmp = Float64(a * 120.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (60.0 / (z - t));
	tmp = 0.0;
	if (a <= -7.8e+68)
		tmp = a * 120.0;
	elseif (a <= -1.18e-45)
		tmp = 60.0 * ((x - y) / z);
	elseif (a <= 3.05e-291)
		tmp = t_1;
	elseif (a <= 6.6e-231)
		tmp = -60.0 * (y / (z - t));
	elseif ((a <= 8e-162) || ~((a <= 4.5e-47)))
		tmp = a * 120.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e+68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.18e-45], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.05e-291], t$95$1, If[LessEqual[a, 6.6e-231], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 8e-162], N[Not[LessEqual[a, 4.5e-47]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 3.05 \cdot 10^{-291}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-162} \lor \neg \left(a \leq 4.5 \cdot 10^{-47}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.80000000000000037e68 or 6.60000000000000056e-231 < a < 7.99999999999999963e-162 or 4.5e-47 < a

    1. Initial program 99.9%

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

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

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

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

    if -7.80000000000000037e68 < a < -1.18e-45

    1. Initial program 99.5%

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

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

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

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

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

    if -1.18e-45 < a < 3.05e-291 or 7.99999999999999963e-162 < a < 4.5e-47

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot 60} \]
      2. metadata-eval48.6%

        \[\leadsto \frac{x}{z - t} \cdot \color{blue}{\frac{1}{0.016666666666666666}} \]
      3. times-frac48.6%

        \[\leadsto \color{blue}{\frac{x \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/48.5%

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*48.7%

        \[\leadsto x \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval48.7%

        \[\leadsto x \cdot \frac{\color{blue}{60}}{z - t} \]
    7. Simplified48.7%

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

    if 3.05e-291 < a < 6.60000000000000056e-231

    1. Initial program 99.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.18 \cdot 10^{-45}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{-291}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-162} \lor \neg \left(a \leq 4.5 \cdot 10^{-47}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]

Alternative 9: 53.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-46}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-232}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-162}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ x (- z t)))))
   (if (<= a -7.8e+68)
     (* a 120.0)
     (if (<= a -6.8e-46)
       (* 60.0 (/ (- x y) z))
       (if (<= a 4.2e-308)
         t_1
         (if (<= a 2.8e-232)
           (* -60.0 (/ y (- z t)))
           (if (<= a 8.4e-162)
             (* a 120.0)
             (if (<= a 1.5e-47) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= -6.8e-46) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 4.2e-308) {
		tmp = t_1;
	} else if (a <= 2.8e-232) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= 8.4e-162) {
		tmp = a * 120.0;
	} else if (a <= 1.5e-47) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * (x / (z - t))
    if (a <= (-7.8d+68)) then
        tmp = a * 120.0d0
    else if (a <= (-6.8d-46)) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (a <= 4.2d-308) then
        tmp = t_1
    else if (a <= 2.8d-232) then
        tmp = (-60.0d0) * (y / (z - t))
    else if (a <= 8.4d-162) then
        tmp = a * 120.0d0
    else if (a <= 1.5d-47) then
        tmp = t_1
    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 / (z - t));
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= -6.8e-46) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 4.2e-308) {
		tmp = t_1;
	} else if (a <= 2.8e-232) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= 8.4e-162) {
		tmp = a * 120.0;
	} else if (a <= 1.5e-47) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * (x / (z - t))
	tmp = 0
	if a <= -7.8e+68:
		tmp = a * 120.0
	elif a <= -6.8e-46:
		tmp = 60.0 * ((x - y) / z)
	elif a <= 4.2e-308:
		tmp = t_1
	elif a <= 2.8e-232:
		tmp = -60.0 * (y / (z - t))
	elif a <= 8.4e-162:
		tmp = a * 120.0
	elif a <= 1.5e-47:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (a <= -7.8e+68)
		tmp = Float64(a * 120.0);
	elseif (a <= -6.8e-46)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (a <= 4.2e-308)
		tmp = t_1;
	elseif (a <= 2.8e-232)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	elseif (a <= 8.4e-162)
		tmp = Float64(a * 120.0);
	elseif (a <= 1.5e-47)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * (x / (z - t));
	tmp = 0.0;
	if (a <= -7.8e+68)
		tmp = a * 120.0;
	elseif (a <= -6.8e-46)
		tmp = 60.0 * ((x - y) / z);
	elseif (a <= 4.2e-308)
		tmp = t_1;
	elseif (a <= 2.8e-232)
		tmp = -60.0 * (y / (z - t));
	elseif (a <= 8.4e-162)
		tmp = a * 120.0;
	elseif (a <= 1.5e-47)
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e+68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.8e-46], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-308], t$95$1, If[LessEqual[a, 2.8e-232], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.4e-162], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.5e-47], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-46}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

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

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

\mathbf{elif}\;a \leq 8.4 \cdot 10^{-162}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-47}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.80000000000000037e68 or 2.79999999999999993e-232 < a < 8.4e-162 or 1.50000000000000008e-47 < a

    1. Initial program 99.9%

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

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

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

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

    if -7.80000000000000037e68 < a < -6.79999999999999992e-46

    1. Initial program 99.5%

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

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

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

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

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

    if -6.79999999999999992e-46 < a < 4.2e-308 or 8.4e-162 < a < 1.50000000000000008e-47

    1. Initial program 99.7%

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

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

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

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

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

    if 4.2e-308 < a < 2.79999999999999993e-232

    1. Initial program 99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-46}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-308}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-232}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-162}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-47}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 10: 53.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-45}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-291}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-162}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-45}:\\ \;\;\;\;60 \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -7.8e+68)
   (* a 120.0)
   (if (<= a -2.9e-45)
     (* 60.0 (/ (- x y) z))
     (if (<= a 1.45e-291)
       (* x (/ 60.0 (- z t)))
       (if (<= a 6.6e-231)
         (* -60.0 (/ y (- z t)))
         (if (<= a 8e-162)
           (* a 120.0)
           (if (<= a 1.1e-45) (* 60.0 (/ (- y x) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= -2.9e-45) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 1.45e-291) {
		tmp = x * (60.0 / (z - t));
	} else if (a <= 6.6e-231) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= 8e-162) {
		tmp = a * 120.0;
	} else if (a <= 1.1e-45) {
		tmp = 60.0 * ((y - x) / t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-7.8d+68)) then
        tmp = a * 120.0d0
    else if (a <= (-2.9d-45)) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (a <= 1.45d-291) then
        tmp = x * (60.0d0 / (z - t))
    else if (a <= 6.6d-231) then
        tmp = (-60.0d0) * (y / (z - t))
    else if (a <= 8d-162) then
        tmp = a * 120.0d0
    else if (a <= 1.1d-45) then
        tmp = 60.0d0 * ((y - x) / t)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -7.8e+68) {
		tmp = a * 120.0;
	} else if (a <= -2.9e-45) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 1.45e-291) {
		tmp = x * (60.0 / (z - t));
	} else if (a <= 6.6e-231) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= 8e-162) {
		tmp = a * 120.0;
	} else if (a <= 1.1e-45) {
		tmp = 60.0 * ((y - x) / t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -7.8e+68:
		tmp = a * 120.0
	elif a <= -2.9e-45:
		tmp = 60.0 * ((x - y) / z)
	elif a <= 1.45e-291:
		tmp = x * (60.0 / (z - t))
	elif a <= 6.6e-231:
		tmp = -60.0 * (y / (z - t))
	elif a <= 8e-162:
		tmp = a * 120.0
	elif a <= 1.1e-45:
		tmp = 60.0 * ((y - x) / t)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -7.8e+68)
		tmp = Float64(a * 120.0);
	elseif (a <= -2.9e-45)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (a <= 1.45e-291)
		tmp = Float64(x * Float64(60.0 / Float64(z - t)));
	elseif (a <= 6.6e-231)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	elseif (a <= 8e-162)
		tmp = Float64(a * 120.0);
	elseif (a <= 1.1e-45)
		tmp = Float64(60.0 * Float64(Float64(y - x) / t));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -7.8e+68)
		tmp = a * 120.0;
	elseif (a <= -2.9e-45)
		tmp = 60.0 * ((x - y) / z);
	elseif (a <= 1.45e-291)
		tmp = x * (60.0 / (z - t));
	elseif (a <= 6.6e-231)
		tmp = -60.0 * (y / (z - t));
	elseif (a <= 8e-162)
		tmp = a * 120.0;
	elseif (a <= 1.1e-45)
		tmp = 60.0 * ((y - x) / t);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.8e+68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.9e-45], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e-291], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e-231], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e-162], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.1e-45], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-162}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -7.80000000000000037e68 or 6.60000000000000056e-231 < a < 7.99999999999999963e-162 or 1.09999999999999997e-45 < a

    1. Initial program 99.9%

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

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

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

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

    if -7.80000000000000037e68 < a < -2.9e-45

    1. Initial program 99.5%

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

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

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

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

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

    if -2.9e-45 < a < 1.45000000000000001e-291

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z - t} \cdot 60} \]
      2. metadata-eval51.4%

        \[\leadsto \frac{x}{z - t} \cdot \color{blue}{\frac{1}{0.016666666666666666}} \]
      3. times-frac51.4%

        \[\leadsto \color{blue}{\frac{x \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/51.4%

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*51.4%

        \[\leadsto x \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval51.4%

        \[\leadsto x \cdot \frac{\color{blue}{60}}{z - t} \]
    7. Simplified51.4%

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

    if 1.45000000000000001e-291 < a < 6.60000000000000056e-231

    1. Initial program 99.5%

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

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

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

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

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

    if 7.99999999999999963e-162 < a < 1.09999999999999997e-45

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{-1 \cdot \left(x - y\right)}{t}} \]
      2. neg-mul-159.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-45}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-291}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-162}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-45}:\\ \;\;\;\;60 \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 11: 53.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-304}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8.4 \cdot 10^{-162}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.49999999999999973e64 or 6.3e-231 < a < 8.4e-162 or 1.35e-46 < a

    1. Initial program 99.9%

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

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

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

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

    if -4.49999999999999973e64 < a < 1.45e-304 or 8.4e-162 < a < 1.35e-46

    1. Initial program 99.7%

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

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

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

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

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

    if 1.45e-304 < a < 6.3e-231

    1. Initial program 99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+64}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-304}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{-231}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-162}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-46}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 12: 72.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+71} \lor \neg \left(a \leq 6.6 \cdot 10^{-231} \lor \neg \left(a \leq 1.8 \cdot 10^{-212}\right) \land a \leq 4.4 \cdot 10^{-45}\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 -3.8e+71)
         (not (or (<= a 6.6e-231) (and (not (<= a 1.8e-212)) (<= a 4.4e-45)))))
   (* 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 <= -3.8e+71) || !((a <= 6.6e-231) || (!(a <= 1.8e-212) && (a <= 4.4e-45)))) {
		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 <= (-3.8d+71)) .or. (.not. (a <= 6.6d-231) .or. (.not. (a <= 1.8d-212)) .and. (a <= 4.4d-45))) 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 <= -3.8e+71) || !((a <= 6.6e-231) || (!(a <= 1.8e-212) && (a <= 4.4e-45)))) {
		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 <= -3.8e+71) or not ((a <= 6.6e-231) or (not (a <= 1.8e-212) and (a <= 4.4e-45))):
		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 <= -3.8e+71) || !((a <= 6.6e-231) || (!(a <= 1.8e-212) && (a <= 4.4e-45))))
		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 <= -3.8e+71) || ~(((a <= 6.6e-231) || (~((a <= 1.8e-212)) && (a <= 4.4e-45)))))
		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, -3.8e+71], N[Not[Or[LessEqual[a, 6.6e-231], And[N[Not[LessEqual[a, 1.8e-212]], $MachinePrecision], LessEqual[a, 4.4e-45]]]], $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 -3.8 \cdot 10^{+71} \lor \neg \left(a \leq 6.6 \cdot 10^{-231} \lor \neg \left(a \leq 1.8 \cdot 10^{-212}\right) \land a \leq 4.4 \cdot 10^{-45}\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 < -3.8000000000000001e71 or 6.60000000000000056e-231 < a < 1.8e-212 or 4.39999999999999987e-45 < a

    1. Initial program 100.0%

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

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

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

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

    if -3.8000000000000001e71 < a < 6.60000000000000056e-231 or 1.8e-212 < a < 4.39999999999999987e-45

    1. Initial program 99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+71} \lor \neg \left(a \leq 6.6 \cdot 10^{-231} \lor \neg \left(a \leq 1.8 \cdot 10^{-212}\right) \land a \leq 4.4 \cdot 10^{-45}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]

Alternative 13: 88.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35000000000000002e-4 or 4.2000000000000002e26 < y

    1. Initial program 99.8%

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

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

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

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

    if -1.35000000000000002e-4 < y < 4.2000000000000002e26

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 14: 88.5% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.09999999999999987e-5

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if -6.09999999999999987e-5 < y < 2.99999999999999997e26

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 2.99999999999999997e26 < y

    1. Initial program 99.8%

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

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

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

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

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

Alternative 15: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 16: 99.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 17: 57.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+187} \lor \neg \left(y \leq 6.2 \cdot 10^{+207}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.4999999999999996e187 or 6.2000000000000005e207 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -9.4999999999999996e187 < y < 6.2000000000000005e207

    1. Initial program 99.8%

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

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

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

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

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

Alternative 18: 52.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+271} \lor \neg \left(y \leq 1.15 \cdot 10^{+225}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.9999999999999999e271 or 1.15e225 < y

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    7. Simplified87.9%

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

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

    if -6.9999999999999999e271 < y < 1.15e225

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+271} \lor \neg \left(y \leq 1.15 \cdot 10^{+225}\right):\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 19: 52.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+224}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 99.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    7. Simplified99.5%

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

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

    if -1.05999999999999991e271 < y < 7e224

    1. Initial program 99.8%

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

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

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

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

    if 7e224 < y

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    7. Simplified79.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{+271}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+224}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 20: 52.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+225}:\\
\;\;\;\;a \cdot 120\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{60}}\\


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

    1. Initial program 99.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    7. Simplified99.5%

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

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

    if -1.05000000000000001e273 < y < 7.1999999999999996e225

    1. Initial program 99.8%

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

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

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

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

    if 7.1999999999999996e225 < y

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    7. Simplified79.9%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} \]
      2. *-commutative62.7%

        \[\leadsto \frac{\color{blue}{y \cdot 60}}{t} \]
      3. associate-/l*62.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{60}}} \]
    10. Simplified62.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+273}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+225}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{t}{60}}\\ \end{array} \]

Alternative 21: 51.0% accurate, 4.3× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  5. Final simplification53.4%

    \[\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 2023257 
(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)))