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

Percentage Accurate: 99.4% → 99.8%
Time: 22.6s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 99.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 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

    if -2.0000000000000002e128 < (*.f64 a 120) < -8.0000000000000006e54

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -8.0000000000000006e54 < (*.f64 a 120) < -1e-59 or 5.00000000000000028e-33 < (*.f64 a 120) < 2.0000000000000001e-13

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{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 x around inf 93.1%

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

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

    if -1e-59 < (*.f64 a 120) < 5.00000000000000028e-33 or 2.0000000000000001e-13 < (*.f64 a 120) < 1.99999999999999992e28

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 1.99999999999999992e28 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+128}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq -8 \cdot 10^{+54}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-59}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-33}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-13}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+28}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.6% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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


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

    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 a around inf 100.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(120 + 60 \cdot \frac{y}{a \cdot t}\right)} \]
    12. Step-by-step derivation
      1. *-commutative97.1%

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

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

    if -2.0000000000000002e128 < (*.f64 a 120) < -8.0000000000000006e54

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -8.0000000000000006e54 < (*.f64 a 120) < -1e-59 or 5.00000000000000028e-33 < (*.f64 a 120) < 2.0000000000000001e-13

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{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 x around inf 93.1%

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

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

    if -1e-59 < (*.f64 a 120) < 5.00000000000000028e-33 or 2.0000000000000001e-13 < (*.f64 a 120) < 1.99999999999999992e28

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 1.99999999999999992e28 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+128}:\\ \;\;\;\;a \cdot \left(120 + 60 \cdot \frac{y}{a \cdot t}\right)\\ \mathbf{elif}\;a \cdot 120 \leq -8 \cdot 10^{+54}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-59}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-33}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-13}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+28}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.9% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -1e-58 or 1.99999999999999992e28 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

    if -1e-58 < (*.f64 a 120) < 5.00000000000000028e-33 or 2.0000000000000001e-13 < (*.f64 a 120) < 1.99999999999999992e28

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 5.00000000000000028e-33 < (*.f64 a 120) < 2.0000000000000001e-13

    1. Initial program 99.5%

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

        \[\leadsto \color{blue}{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 x around inf 99.7%

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

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

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

Alternative 5: 58.2% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.2000000000000005e-120 or 6.1999999999999998e-52 < a

    1. Initial program 99.8%

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

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

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

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

    if -7.2000000000000005e-120 < a < -6.0000000000000003e-221

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000003e-221 < a < -2.50000000000000004e-295

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000004e-295 < a < 6.1999999999999998e-52

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-120}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-221}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-295}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-52}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.04 \cdot 10^{-218}:\\
\;\;\;\;x \cdot \frac{60}{-t}\\

\mathbf{elif}\;a \leq -5 \cdot 10^{-294}:\\
\;\;\;\;\frac{x \cdot 60}{z}\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-168}:\\
\;\;\;\;-60 \cdot \frac{y}{-t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.50000000000000059e-120 or 2.29999999999999986e-168 < a

    1. Initial program 99.8%

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

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

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

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

    if -8.50000000000000059e-120 < a < -1.04000000000000001e-218

    1. Initial program 94.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-120 \cdot \frac{a}{x} - 60 \cdot \frac{1}{z - t}\right) \]
      3. *-commutative58.9%

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

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

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

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

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

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

    if -1.04000000000000001e-218 < a < -5.0000000000000003e-294

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000003e-294 < a < 2.29999999999999986e-168

    1. Initial program 99.8%

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

        \[\leadsto \color{blue}{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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto -60 \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. neg-mul-141.4%

        \[\leadsto -60 \cdot \frac{\color{blue}{-y}}{t} \]
    11. Simplified41.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{-120}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.04 \cdot 10^{-218}:\\ \;\;\;\;x \cdot \frac{60}{-t}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-294}:\\ \;\;\;\;\frac{x \cdot 60}{z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-168}:\\ \;\;\;\;-60 \cdot \frac{y}{-t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 82.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -2.00000000000000006e-117 or 5.00000000000000028e-33 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

    if -2.00000000000000006e-117 < (*.f64 a 120) < 5.00000000000000028e-33

    1. Initial program 98.6%

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

        \[\leadsto \color{blue}{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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

Alternative 8: 81.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.20000000000000007e-46 or 5.99999999999999978e-41 < z

    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 0 87.6%

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

    if -1.20000000000000007e-46 < z < 5.99999999999999978e-41

    1. Initial program 99.8%

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

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

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

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

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

Alternative 9: 88.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8000000000000001e-15 or 9.20000000000000008e111 < y

    1. Initial program 98.9%

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

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

    if -1.8000000000000001e-15 < y < 9.20000000000000008e111

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

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

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

Alternative 10: 88.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-15} \lor \neg \left(y \leq 3 \cdot 10^{+111}\right):\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -1.8e-15) (not (<= y 3e+111)))
   (+ (* a 120.0) (* -60.0 (/ y (- 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.8e-15) || !(y <= 3e+111)) {
		tmp = (a * 120.0) + (-60.0 * (y / (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.8d-15)) .or. (.not. (y <= 3d+111))) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (y / (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.8e-15) || !(y <= 3e+111)) {
		tmp = (a * 120.0) + (-60.0 * (y / (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.8e-15) or not (y <= 3e+111):
		tmp = (a * 120.0) + (-60.0 * (y / (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.8e-15) || !(y <= 3e+111))
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t))));
	else
		tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -1.8e-15) || ~((y <= 3e+111)))
		tmp = (a * 120.0) + (-60.0 * (y / (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.8e-15], N[Not[LessEqual[y, 3e+111]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8000000000000001e-15 or 3e111 < y

    1. Initial program 98.9%

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

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

    if -1.8000000000000001e-15 < y < 3e111

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

      \[\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 \]
    7. Simplified93.9%

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

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

Alternative 11: 74.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.3 \cdot 10^{-61} \lor \neg \left(a \leq 1.05 \cdot 10^{+27}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.3e-61 or 1.04999999999999997e27 < a

    1. Initial program 99.9%

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

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

    if -5.3e-61 < a < 1.04999999999999997e27

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

Alternative 12: 58.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.6000000000000002e-121 or 1.1e-51 < a

    1. Initial program 99.8%

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

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

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

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

    if -7.6000000000000002e-121 < a < 1.1e-51

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

Alternative 13: 58.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-120} \lor \neg \left(a \leq 5.9 \cdot 10^{-34}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.2000000000000005e-120 or 5.9000000000000002e-34 < a

    1. Initial program 99.8%

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

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

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

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

    if -7.2000000000000005e-120 < a < 5.9000000000000002e-34

    1. Initial program 98.6%

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

        \[\leadsto \color{blue}{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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

Alternative 14: 52.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-122} \lor \neg \left(a \leq 1.5 \cdot 10^{-165}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.00000000000000047e-122 or 1.49999999999999989e-165 < a

    1. Initial program 99.8%

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

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

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

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

    if -8.00000000000000047e-122 < a < 1.49999999999999989e-165

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto -60 \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. neg-mul-134.0%

        \[\leadsto -60 \cdot \frac{\color{blue}{-y}}{t} \]
    11. Simplified34.0%

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

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

Alternative 15: 51.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.70000000000000008e-251 or 6.0999999999999999e-52 < a

    1. Initial program 99.3%

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

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

    if -1.70000000000000008e-251 < a < 6.0999999999999999e-52

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 16: 51.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.20000000000000002e-121 or 6e-52 < a

    1. Initial program 99.8%

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

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

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

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

    if -1.20000000000000002e-121 < a < 6e-52

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
      2. *-commutative28.8%

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

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

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

Alternative 17: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 18: 50.6% accurate, 4.3× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification57.1%

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