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

Percentage Accurate: 99.3% → 99.8%
Time: 15.8s
Alternatives: 15
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 15 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.3% 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, \left(x - y\right) \cdot \frac{60}{z - t}\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (fma a 120.0 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a)
	return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))))
end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.0% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+292}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.4999999999999998e36 or 1.44999999999999995e292 < 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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

    if -6.4999999999999998e36 < z < -1.79999999999999992e-6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999992e-6 < z < 5.1999999999999996e-68

    1. Initial program 98.2%

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

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

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

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

    if 5.1999999999999996e-68 < z < 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2 < z < 1.44999999999999995e292

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+36}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-6}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-68}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;z \leq 2:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+292}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.6% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 98.8%

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

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

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

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

    if -4e8 < (*.f64 a 120) < 4e-52

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e-52 < (*.f64 a 120) < 1.10000000000000003e189

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. *-commutative76.4%

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

        \[\leadsto \color{blue}{\frac{y \cdot 60}{t}} + a \cdot 120 \]
    10. Simplified76.4%

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

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

Alternative 4: 83.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.40000000000000008e46 or 3.8999999999999998e-29 < 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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -2.40000000000000008e46 < z < -1.5999999999999999e-6

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e-6 < z < 3.8999999999999998e-29

    1. Initial program 98.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+46}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-6}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-29}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 83.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.59999999999999983e48 or 9.20000000000000035e-26 < 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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -3.59999999999999983e48 < z < -2.0999999999999998e-6

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999998e-6 < z < 9.20000000000000035e-26

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+48}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-6}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-26}:\\ \;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

    if -4e8 < (*.f64 a 120) < 9.99999999999999923e-66

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999923e-66 < (*.f64 a 120)

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

Alternative 7: 89.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.8000000000000003e69 or 1.3000000000000001e36 < x

    1. Initial program 98.1%

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

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

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

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

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

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

    if -4.8000000000000003e69 < x < 1.3000000000000001e36

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 8: 75.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -860000 \lor \neg \left(a \leq 6.2 \cdot 10^{-51}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.6e5 or 6.1999999999999995e-51 < a

    1. Initial program 99.2%

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

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

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

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

    if -8.6e5 < a < 6.1999999999999995e-51

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 58.0% accurate, 0.8× speedup?

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

    1. Initial program 98.9%

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

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

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

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

    if -1.35e-127 < a < 9.59999999999999932e-164

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 58.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{-113} \lor \neg \left(a \leq 1.45 \cdot 10^{-52}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.75000000000000014e-113 or 1.4500000000000001e-52 < a

    1. Initial program 99.3%

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

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

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

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

    if -1.75000000000000014e-113 < a < 1.4500000000000001e-52

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 51.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 5.2 \cdot 10^{+207}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 97.1%

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

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

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

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

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

    if -6.1999999999999999e162 < x < 5.1999999999999996e207

    1. Initial program 99.8%

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

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

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

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

    if 5.1999999999999996e207 < x

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

Alternative 12: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 51.2% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

    if 1.0200000000000001e207 < x

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

Alternative 15: 50.3% 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.1%

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification54.0%

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

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 2024044 
(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)))