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

Percentage Accurate: 99.2% → 99.8%
Time: 17.8s
Alternatives: 18
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 18 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 71.8% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-117}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999998e87 or -5e-31 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -2.00000000000000006e-117

    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. Step-by-step derivation
      1. associate-/r/99.6%

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

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

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

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

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

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

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

    if -4.9999999999999998e87 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5e-31

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -2.00000000000000006e-117 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5.00000000000000004e-51

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

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

    if 5.00000000000000004e-51 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
      3. associate-*r/67.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)} - 1 \]
      4. associate-/l*67.7%

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

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

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

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

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

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

Alternative 3: 66.8% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (-.f64 z t) < -4.99999999999999991e76 or 4.00000000000000027e265 < (-.f64 z t)

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

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

    if -4.99999999999999991e76 < (-.f64 z t) < 1e92

    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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

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

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

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

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

    if 1e92 < (-.f64 z t) < 5e179

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 5e179 < (-.f64 z t) < 4.00000000000000027e265

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -5 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq 10^{+92}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;z - t \leq 5 \cdot 10^{+179}:\\ \;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\ \mathbf{elif}\;z - t \leq 4 \cdot 10^{+265}:\\ \;\;\;\;60 \cdot \frac{x}{z} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 4: 66.3% accurate, 0.5× speedup?

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

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

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

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

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

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


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

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

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

    if -4.99999999999999991e76 < (-.f64 z t) < 1e92

    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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

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

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

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

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

    if 1e92 < (-.f64 z t) < 5e179

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 5e179 < (-.f64 z t) < 4.00000000000000023e232

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 4.00000000000000023e232 < (-.f64 z t)

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -5 \cdot 10^{+76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq 10^{+92}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;z - t \leq 5 \cdot 10^{+179}:\\ \;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\ \mathbf{elif}\;z - t \leq 4 \cdot 10^{+232}:\\ \;\;\;\;60 \cdot \frac{x}{z} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{z}{y}}\\ \end{array} \]

Alternative 5: 74.1% accurate, 0.6× speedup?

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

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

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

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

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

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.00000000000000004e-51 or 1.2e16 < z

    1. Initial program 99.9%

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

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

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

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

    if -5.00000000000000004e-51 < z < -1.60000000000000002e-250

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
      3. associate-*r/27.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)} - 1 \]
      4. associate-/l*27.8%

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

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

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

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

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

    if -1.60000000000000002e-250 < z < -6.1999999999999996e-307

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

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

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

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

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

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

    if -6.1999999999999996e-307 < z < 7.9999999999999999e-238

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

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

    if 7.9999999999999999e-238 < z < 8.7999999999999993e-204

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

      \[\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 \]
    6. Simplified99.8%

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

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

    if 8.7999999999999993e-204 < z < 1.2e16

    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.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. Step-by-step derivation
      1. associate-/r/99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-51}:\\ \;\;\;\;60 \cdot \frac{x - y}{z} + a \cdot 120\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-250}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-307}:\\ \;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-238}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-204}:\\ \;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z} + a \cdot 120\\ \end{array} \]

Alternative 6: 67.5% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -4.99999999999999991e76 or 1e92 < (-.f64 z t)

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

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

    if -4.99999999999999991e76 < (-.f64 z t) < 1e92

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

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

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

Alternative 7: 67.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 10^{+92}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -4.99999999999999991e76 or 1e92 < (-.f64 z t)

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

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

    if -4.99999999999999991e76 < (-.f64 z t) < 1e92

    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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

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

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

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

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

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

Alternative 8: 54.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 2 \cdot 10^{+68}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -4.99999999999999991e76 or 1.99999999999999991e68 < (-.f64 z t)

    1. Initial program 99.9%

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

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

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

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

    if -4.99999999999999991e76 < (-.f64 z t) < 1.99999999999999991e68

    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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

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

Alternative 9: 55.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 10^{+77}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -4.99999999999999991e76 or 9.99999999999999983e76 < (-.f64 z t)

    1. Initial program 99.9%

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

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

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

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

    if -4.99999999999999991e76 < (-.f64 z t) < 9.99999999999999983e76

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

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

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

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

Alternative 10: 83.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{-76} \lor \neg \left(z \leq 3.2 \cdot 10^{+14}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.79999999999999944e-76 or 3.2e14 < z

    1. Initial program 99.9%

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

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

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

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

    if -9.79999999999999944e-76 < z < 3.2e14

    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 z around 0 87.4%

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

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

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

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

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

Alternative 11: 89.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.39999999999999993e96 or 1.34999999999999995e76 < x

    1. Initial program 99.7%

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

        \[\leadsto \color{blue}{\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 96.2%

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

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

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

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

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

    if -2.39999999999999993e96 < x < 1.34999999999999995e76

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

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

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

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

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

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

Alternative 12: 89.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.59999999999999981e98 or 5.5000000000000003e74 < x

    1. Initial program 99.7%

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

        \[\leadsto \color{blue}{\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 96.2%

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

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

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

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

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

    if -3.59999999999999981e98 < x < 5.5000000000000003e74

    1. Initial program 99.8%

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

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

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

Alternative 13: 89.5% accurate, 0.9× speedup?

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

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

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

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


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

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

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

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

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

    if -1.29999999999999995e95 < x < 3.50000000000000002e70

    1. Initial program 99.8%

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

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

    if 3.50000000000000002e70 < x

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

Alternative 14: 47.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-106} \lor \neg \left(z \leq 3.9 \cdot 10^{-237}\right) \land \left(z \leq 2.2 \cdot 10^{-206} \lor \neg \left(z \leq 2 \cdot 10^{-80}\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.99999999999999953e-106 or 3.8999999999999998e-237 < z < 2.1999999999999999e-206 or 1.99999999999999992e-80 < z

    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} \]

    if -7.99999999999999953e-106 < z < 3.8999999999999998e-237 or 2.1999999999999999e-206 < z < 1.99999999999999992e-80

    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.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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    8. Applied egg-rr48.5%

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

      \[\leadsto \frac{-60}{\color{blue}{-1 \cdot \frac{t}{y}}} \]
    10. Step-by-step derivation
      1. mul-1-neg46.7%

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

        \[\leadsto \frac{-60}{\color{blue}{\frac{-t}{y}}} \]
    11. Simplified46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-106} \lor \neg \left(z \leq 3.9 \cdot 10^{-237}\right) \land \left(z \leq 2.2 \cdot 10^{-206} \lor \neg \left(z \leq 2 \cdot 10^{-80}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{-t}{y}}\\ \end{array} \]

Alternative 15: 47.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-106} \lor \neg \left(z \leq 2.2 \cdot 10^{-237}\right) \land \left(z \leq 1.52 \cdot 10^{-207} \lor \neg \left(z \leq 5.2 \cdot 10^{-85}\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9e-106 or 2.19999999999999998e-237 < z < 1.52000000000000005e-207 or 5.20000000000000023e-85 < z

    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} \]

    if -1.9e-106 < z < 2.19999999999999998e-237 or 1.52000000000000005e-207 < z < 5.20000000000000023e-85

    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.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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{-106} \lor \neg \left(z \leq 2.2 \cdot 10^{-237}\right) \land \left(z \leq 1.52 \cdot 10^{-207} \lor \neg \left(z \leq 5.2 \cdot 10^{-85}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 16: 99.8% accurate, 1.0× speedup?

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

\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.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. Step-by-step derivation
    1. associate-/r/99.8%

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

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

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

Alternative 17: 52.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+247} \lor \neg \left(y \leq 10^{+188}\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 -5.8e+247) (not (<= y 1e+188))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -5.8e+247) || !(y <= 1e+188)) {
		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 <= (-5.8d+247)) .or. (.not. (y <= 1d+188))) 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 <= -5.8e+247) || !(y <= 1e+188)) {
		tmp = -60.0 * (y / z);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -5.8e+247) or not (y <= 1e+188):
		tmp = -60.0 * (y / z)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -5.8e+247) || !(y <= 1e+188))
		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 <= -5.8e+247) || ~((y <= 1e+188)))
		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, -5.8e+247], N[Not[LessEqual[y, 1e+188]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+247} \lor \neg \left(y \leq 10^{+188}\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 < -5.8000000000000004e247 or 1e188 < 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.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. Step-by-step derivation
      1. associate-/r/99.8%

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

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

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

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

    if -5.8000000000000004e247 < y < 1e188

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

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

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

Alternative 18: 50.9% accurate, 4.3× speedup?

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

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

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023326 
(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)))