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

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

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(a, 120, \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 98.3%

    \[\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/98.3%

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

      \[\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: 73.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.0004 \lor \neg \left(a \cdot 120 \leq -2 \cdot 10^{-69} \lor \neg \left(a \cdot 120 \leq -1 \cdot 10^{-137}\right) \land a \cdot 120 \leq 2 \cdot 10^{-26}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4 or -1.9999999999999999e-69 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138 or 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 97.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 70.5%

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

    if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e-69 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26

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

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

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

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

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

Alternative 3: 72.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-137}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4 or -1.9999999999999999e-69 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138

    1. Initial program 98.5%

      \[\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 71.5%

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

    if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e-69 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26

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

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

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

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

    if 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64))

    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.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. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{{\left(\frac{x - y}{z - t}\right)}^{-1}}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. unpow-199.9%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{0 - \left(z - t\right)}}}} + a \cdot 120 \]
      4. associate--r-82.5%

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

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

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

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

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

Alternative 4: 71.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-137}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4 or -9.99999999999999927e-77 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138

    1. Initial program 98.5%

      \[\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 75.3%

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

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

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

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

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

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

    if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999927e-77 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26

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

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

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

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

    if 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64))

    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.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. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{{\left(\frac{x - y}{z - t}\right)}^{-1}}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. unpow-199.9%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{0 - \left(z - t\right)}}}} + a \cdot 120 \]
      4. associate--r-82.5%

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

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

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

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

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

Alternative 5: 71.5% accurate, 0.4× speedup?

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

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

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

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

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

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


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

    1. Initial program 98.3%

      \[\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 74.3%

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

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

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

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

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

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

    if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999927e-77 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26

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

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

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

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

    if -9.99999999999999927e-77 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138

    1. Initial program 99.6%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{{\left(\frac{x - y}{z - t}\right)}^{-1}}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. unpow-199.7%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{0 - \left(z - t\right)}}}} + a \cdot 120 \]
      4. associate--r-86.9%

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{\left(0 - z\right) + t}}}} + a \cdot 120 \]
      5. neg-sub086.9%

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

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

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

    if 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64))

    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.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. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{{\left(\frac{x - y}{z - t}\right)}^{-1}}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. unpow-199.9%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{0 - \left(z - t\right)}}}} + a \cdot 120 \]
      4. associate--r-82.5%

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

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

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

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

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

Alternative 6: 66.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z - t \leq 2 \cdot 10^{+67}:\\
\;\;\;\;60 \cdot \frac{y - x}{t - z}\\

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

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


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

    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 inf 79.2%

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

    if -1.1999999999999999e190 < (-.f64 z t) < -4.9999999999999998e87

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} + a \cdot 120 \]
    10. Simplified84.1%

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

    if -4.9999999999999998e87 < (-.f64 z t) < 1.99999999999999997e67

    1. Initial program 99.7%

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

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

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

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

    if 1.99999999999999997e67 < (-.f64 z t) < 1.9999999999999999e211

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{{\left(\frac{x - y}{z - t}\right)}^{-1}}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. unpow-199.8%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{0 - \left(z - t\right)}}}} + a \cdot 120 \]
      4. associate--r-83.7%

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

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

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

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

    if 1.9999999999999999e211 < (-.f64 z t)

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{{\left(\frac{x - y}{z - t}\right)}^{-1}}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. unpow-199.6%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{0 - \left(z - t\right)}}}} + a \cdot 120 \]
      4. associate--r-85.0%

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

        \[\leadsto \frac{60}{\frac{1}{\frac{y}{\color{blue}{\left(-z\right)} + t}}} + a \cdot 120 \]
    13. Simplified85.0%

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

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

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

Alternative 7: 58.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-12} \lor \neg \left(a \leq -5.2 \cdot 10^{-75}\right) \land \left(a \leq -3.6 \cdot 10^{-143} \lor \neg \left(a \leq 5 \cdot 10^{-44}\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.8000000000000002e-12 or -5.2e-75 < a < -3.5999999999999998e-143 or 5.00000000000000039e-44 < a

    1. Initial program 97.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 69.3%

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

    if -2.8000000000000002e-12 < a < -5.2e-75 or -3.5999999999999998e-143 < a < 5.00000000000000039e-44

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{-12} \lor \neg \left(a \leq -5.2 \cdot 10^{-75}\right) \land \left(a \leq -3.6 \cdot 10^{-143} \lor \neg \left(a \leq 5 \cdot 10^{-44}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 83.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1000000000000001e26 or 3.74999999999999984e-47 < z

    1. Initial program 98.3%

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

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

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

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

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

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

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

    if -2.1000000000000001e26 < z < 3.74999999999999984e-47

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

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

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

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

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

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

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

Alternative 9: 89.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4499999999999999e94 or 7.5999999999999996e38 < y

    1. Initial program 96.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 88.0%

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

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

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

    if -1.4499999999999999e94 < y < 7.5999999999999996e38

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

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

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

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

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

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

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

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

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

Alternative 10: 89.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.80000000000000021e93 or 4.49999999999999962e37 < y

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000021e93 < y < 4.49999999999999962e37

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

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

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

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

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

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

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

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

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

Alternative 11: 80.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 96.3%

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

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

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

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

    if -1.6999999999999999e36 < y < 1.29999999999999993e123

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 1.29999999999999993e123 < y

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

Alternative 12: 54.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-85} \lor \neg \left(z \leq 2.05 \cdot 10^{-112}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.49999999999999964e-85 or 2.04999999999999998e-112 < z

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

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

    if -9.49999999999999964e-85 < z < 2.04999999999999998e-112

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

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

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

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

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

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

Alternative 13: 52.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+108} \lor \neg \left(y \leq 1.7 \cdot 10^{+217}\right):\\
\;\;\;\;-60 \cdot \frac{y}{-t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.6e108 or 1.6999999999999999e217 < y

    1. Initial program 94.7%

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

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

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

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

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

      \[\leadsto -60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{t}\right)} \]
    8. Step-by-step derivation
      1. neg-mul-146.6%

        \[\leadsto -60 \cdot \color{blue}{\left(-\frac{y}{t}\right)} \]
      2. distribute-neg-frac46.6%

        \[\leadsto -60 \cdot \color{blue}{\frac{-y}{t}} \]
    9. Simplified46.6%

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

    if -3.6e108 < y < 1.6999999999999999e217

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

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

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

Alternative 14: 99.8% accurate, 1.0× speedup?

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

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

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

Alternative 15: 50.9% accurate, 4.3× speedup?

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

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

    \[\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 48.3%

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification48.3%

    \[\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 2024077 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

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

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