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

Percentage Accurate: 99.3% → 99.8%
Time: 14.2s
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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 71.8% accurate, 0.6× speedup?

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

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -4.00000000000000017e36 < (*.f64 a 120) < -1.99999999999999991e-57

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e-57 < (*.f64 a 120) < 1.00000000000000007e-37

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
    9. Step-by-step derivation
      1. clear-num81.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - t}{\left(x - y\right) \cdot 60}}} \]
      2. *-un-lft-identity81.0%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{x - y} \cdot \frac{z - t}{60}}} \]
      4. clear-num80.8%

        \[\leadsto \frac{1}{\frac{1}{x - y} \cdot \color{blue}{\frac{1}{\frac{60}{z - t}}}} \]
      5. div-inv80.8%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x - y}}{\frac{60}{z - t}}}} \]
      6. clear-num80.9%

        \[\leadsto \color{blue}{\frac{\frac{60}{z - t}}{\frac{1}{x - y}}} \]
      7. associate-/r/81.1%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\frac{60}{z - t}}}} \cdot \left(x - y\right) \]
      9. clear-num81.0%

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

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

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

    if 1.00000000000000007e-37 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto \frac{60}{\color{blue}{\frac{-1 \cdot z}{y}}} + a \cdot 120 \]
      2. mul-1-neg81.2%

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

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

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

Alternative 3: 71.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-57} \lor \neg \left(a \cdot 120 \leq 10^{-37}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -4.00000000000000017e36 < (*.f64 a 120) < -1.99999999999999991e-57 or 1.00000000000000007e-37 < (*.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}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

    if -1.99999999999999991e-57 < (*.f64 a 120) < 1.00000000000000007e-37

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
    9. Step-by-step derivation
      1. clear-num81.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - t}{\left(x - y\right) \cdot 60}}} \]
      2. *-un-lft-identity81.0%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{x - y} \cdot \frac{z - t}{60}}} \]
      4. clear-num80.8%

        \[\leadsto \frac{1}{\frac{1}{x - y} \cdot \color{blue}{\frac{1}{\frac{60}{z - t}}}} \]
      5. div-inv80.8%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x - y}}{\frac{60}{z - t}}}} \]
      6. clear-num80.9%

        \[\leadsto \color{blue}{\frac{\frac{60}{z - t}}{\frac{1}{x - y}}} \]
      7. associate-/r/81.1%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\frac{60}{z - t}}}} \cdot \left(x - y\right) \]
      9. clear-num81.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+36}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-57} \lor \neg \left(a \cdot 120 \leq 10^{-37}\right):\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \end{array} \]

Alternative 4: 71.8% accurate, 0.6× speedup?

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

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -4.00000000000000017e36 < (*.f64 a 120) < -1.99999999999999991e-57

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e-57 < (*.f64 a 120) < 1.00000000000000007e-37

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
    9. Step-by-step derivation
      1. clear-num81.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - t}{\left(x - y\right) \cdot 60}}} \]
      2. *-un-lft-identity81.0%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{x - y} \cdot \frac{z - t}{60}}} \]
      4. clear-num80.8%

        \[\leadsto \frac{1}{\frac{1}{x - y} \cdot \color{blue}{\frac{1}{\frac{60}{z - t}}}} \]
      5. div-inv80.8%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x - y}}{\frac{60}{z - t}}}} \]
      6. clear-num80.9%

        \[\leadsto \color{blue}{\frac{\frac{60}{z - t}}{\frac{1}{x - y}}} \]
      7. associate-/r/81.1%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\frac{60}{z - t}}}} \cdot \left(x - y\right) \]
      9. clear-num81.0%

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

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

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

    if 1.00000000000000007e-37 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 5: 80.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+251}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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

\mathbf{elif}\;y \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;t_1 \cdot \left(x - y\right)\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120 + t_1 \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -5.6000000000000001e251

    1. Initial program 99.8%

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

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

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

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

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

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

    if -5.6000000000000001e251 < y < -2.59999999999999987e188

    1. Initial program 99.8%

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

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

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

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

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

    if -2.59999999999999987e188 < y < -7.2e19

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
    9. Step-by-step derivation
      1. clear-num74.8%

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{x - y} \cdot \frac{z - t}{60}}} \]
      4. clear-num74.7%

        \[\leadsto \frac{1}{\frac{1}{x - y} \cdot \color{blue}{\frac{1}{\frac{60}{z - t}}}} \]
      5. div-inv74.7%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x - y}}{\frac{60}{z - t}}}} \]
      6. clear-num74.8%

        \[\leadsto \color{blue}{\frac{\frac{60}{z - t}}{\frac{1}{x - y}}} \]
      7. associate-/r/75.0%

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

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

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

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

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

    if -7.2e19 < y < 3.20000000000000019e141

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if 3.20000000000000019e141 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+251}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{+188}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{+19}:\\ \;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+141}:\\ \;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \end{array} \]

Alternative 6: 58.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x}{z - t}\\ t_2 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -7.2 \cdot 10^{-68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-173}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-245}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-56}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ x (- z t)))) (t_2 (* -60.0 (/ y (- z t)))))
   (if (<= a -7.2e-68)
     (* a 120.0)
     (if (<= a -5.3e-173)
       t_2
       (if (<= a 1.25e-245)
         t_1
         (if (<= a 4.2e-236) t_2 (if (<= a 5e-56) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double t_2 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -7.2e-68) {
		tmp = a * 120.0;
	} else if (a <= -5.3e-173) {
		tmp = t_2;
	} else if (a <= 1.25e-245) {
		tmp = t_1;
	} else if (a <= 4.2e-236) {
		tmp = t_2;
	} else if (a <= 5e-56) {
		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 / (z - t))
    t_2 = (-60.0d0) * (y / (z - t))
    if (a <= (-7.2d-68)) then
        tmp = a * 120.0d0
    else if (a <= (-5.3d-173)) then
        tmp = t_2
    else if (a <= 1.25d-245) then
        tmp = t_1
    else if (a <= 4.2d-236) then
        tmp = t_2
    else if (a <= 5d-56) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double t_2 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -7.2e-68) {
		tmp = a * 120.0;
	} else if (a <= -5.3e-173) {
		tmp = t_2;
	} else if (a <= 1.25e-245) {
		tmp = t_1;
	} else if (a <= 4.2e-236) {
		tmp = t_2;
	} else if (a <= 5e-56) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * (x / (z - t))
	t_2 = -60.0 * (y / (z - t))
	tmp = 0
	if a <= -7.2e-68:
		tmp = a * 120.0
	elif a <= -5.3e-173:
		tmp = t_2
	elif a <= 1.25e-245:
		tmp = t_1
	elif a <= 4.2e-236:
		tmp = t_2
	elif a <= 5e-56:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(x / Float64(z - t)))
	t_2 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (a <= -7.2e-68)
		tmp = Float64(a * 120.0);
	elseif (a <= -5.3e-173)
		tmp = t_2;
	elseif (a <= 1.25e-245)
		tmp = t_1;
	elseif (a <= 4.2e-236)
		tmp = t_2;
	elseif (a <= 5e-56)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * (x / (z - t));
	t_2 = -60.0 * (y / (z - t));
	tmp = 0.0;
	if (a <= -7.2e-68)
		tmp = a * 120.0;
	elseif (a <= -5.3e-173)
		tmp = t_2;
	elseif (a <= 1.25e-245)
		tmp = t_1;
	elseif (a <= 4.2e-236)
		tmp = t_2;
	elseif (a <= 5e-56)
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e-68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -5.3e-173], t$95$2, If[LessEqual[a, 1.25e-245], t$95$1, If[LessEqual[a, 4.2e-236], t$95$2, If[LessEqual[a, 5e-56], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.3 \cdot 10^{-173}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-245}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-236}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.20000000000000015e-68 or 4.99999999999999997e-56 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    if -7.20000000000000015e-68 < a < -5.29999999999999964e-173 or 1.2499999999999999e-245 < a < 4.19999999999999958e-236

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

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

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

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

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

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

    if -5.29999999999999964e-173 < a < 1.2499999999999999e-245 or 4.19999999999999958e-236 < a < 4.99999999999999997e-56

    1. Initial program 99.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-68}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-173}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-245}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-236}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-56}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 7: 58.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{-69}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-245}:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-56}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))))
   (if (<= a -2.5e-69)
     (* a 120.0)
     (if (<= a -1.75e-172)
       t_1
       (if (<= a 4e-245)
         (* (/ 60.0 (- z t)) x)
         (if (<= a 3.3e-235)
           t_1
           (if (<= a 4.5e-56) (* 60.0 (/ x (- z t))) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -2.5e-69) {
		tmp = a * 120.0;
	} else if (a <= -1.75e-172) {
		tmp = t_1;
	} else if (a <= 4e-245) {
		tmp = (60.0 / (z - t)) * x;
	} else if (a <= 3.3e-235) {
		tmp = t_1;
	} else if (a <= 4.5e-56) {
		tmp = 60.0 * (x / (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) :: t_1
    real(8) :: tmp
    t_1 = (-60.0d0) * (y / (z - t))
    if (a <= (-2.5d-69)) then
        tmp = a * 120.0d0
    else if (a <= (-1.75d-172)) then
        tmp = t_1
    else if (a <= 4d-245) then
        tmp = (60.0d0 / (z - t)) * x
    else if (a <= 3.3d-235) then
        tmp = t_1
    else if (a <= 4.5d-56) then
        tmp = 60.0d0 * (x / (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 t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -2.5e-69) {
		tmp = a * 120.0;
	} else if (a <= -1.75e-172) {
		tmp = t_1;
	} else if (a <= 4e-245) {
		tmp = (60.0 / (z - t)) * x;
	} else if (a <= 3.3e-235) {
		tmp = t_1;
	} else if (a <= 4.5e-56) {
		tmp = 60.0 * (x / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	tmp = 0
	if a <= -2.5e-69:
		tmp = a * 120.0
	elif a <= -1.75e-172:
		tmp = t_1
	elif a <= 4e-245:
		tmp = (60.0 / (z - t)) * x
	elif a <= 3.3e-235:
		tmp = t_1
	elif a <= 4.5e-56:
		tmp = 60.0 * (x / (z - t))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (a <= -2.5e-69)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.75e-172)
		tmp = t_1;
	elseif (a <= 4e-245)
		tmp = Float64(Float64(60.0 / Float64(z - t)) * x);
	elseif (a <= 3.3e-235)
		tmp = t_1;
	elseif (a <= 4.5e-56)
		tmp = Float64(60.0 * Float64(x / Float64(z - t)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	tmp = 0.0;
	if (a <= -2.5e-69)
		tmp = a * 120.0;
	elseif (a <= -1.75e-172)
		tmp = t_1;
	elseif (a <= 4e-245)
		tmp = (60.0 / (z - t)) * x;
	elseif (a <= 3.3e-235)
		tmp = t_1;
	elseif (a <= 4.5e-56)
		tmp = 60.0 * (x / (z - t));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.75e-172], t$95$1, If[LessEqual[a, 4e-245], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 3.3e-235], t$95$1, If[LessEqual[a, 4.5e-56], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-235}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.50000000000000017e-69 or 4.5000000000000001e-56 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    if -2.50000000000000017e-69 < a < -1.75000000000000014e-172 or 3.9999999999999997e-245 < a < 3.30000000000000028e-235

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

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

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

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

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

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

    if -1.75000000000000014e-172 < a < 3.9999999999999997e-245

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    11. Simplified65.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} \]
    14. Simplified65.3%

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

    if 3.30000000000000028e-235 < a < 4.5000000000000001e-56

    1. Initial program 99.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-69}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-245}:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-235}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-56}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 8: 58.0% accurate, 0.8× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.4000000000000001e-63 or 2.5000000000000001e-55 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    if -2.4000000000000001e-63 < a < -2.89999999999999999e-175

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. *-commutative53.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z - t}{-60}}} \]
    8. Simplified53.7%

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

    if -2.89999999999999999e-175 < a < 9.9999999999999993e-246

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    11. Simplified65.2%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} \]
    14. Simplified65.3%

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

    if 9.9999999999999993e-246 < a < 3.2e-237

    1. Initial program 100.0%

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

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

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

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

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

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

    if 3.2e-237 < a < 2.5000000000000001e-55

    1. Initial program 99.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{-63}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-175}:\\ \;\;\;\;\frac{y}{\frac{z - t}{-60}}\\ \mathbf{elif}\;a \leq 10^{-245}:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-237}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-55}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 9: 81.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-121} \lor \neg \left(t \leq 5.7 \cdot 10^{-28}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.24999999999999997e-121 or 5.7000000000000004e-28 < t

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999997e-121 < t < 5.7000000000000004e-28

    1. Initial program 99.8%

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

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

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

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

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

Alternative 10: 87.6% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

    if -8.6000000000000005e172 < x < 1.25e26

    1. Initial program 99.8%

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

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

    if 1.25e26 < x

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 87.5% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

    if -9.2000000000000003e172 < x < 6.00000000000000011e25

    1. Initial program 99.8%

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

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

    if 6.00000000000000011e25 < x

    1. Initial program 99.9%

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

      \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
    3. Step-by-step derivation
      1. *-commutative92.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+172}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+25}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\ \end{array} \]

Alternative 12: 74.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 1.35 \cdot 10^{-14}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.40000000000000015e-59 or 1.3499999999999999e-14 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    if -2.40000000000000015e-59 < a < 1.3499999999999999e-14

    1. Initial program 99.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{-59}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-14}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 13: 74.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1999999999999999e-59 or 5.3000000000000002e-20 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    if -3.1999999999999999e-59 < a < 5.3000000000000002e-20

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
    9. Step-by-step derivation
      1. clear-num81.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - t}{\left(x - y\right) \cdot 60}}} \]
      2. *-un-lft-identity81.3%

        \[\leadsto \frac{1}{\frac{\color{blue}{1 \cdot \left(z - t\right)}}{\left(x - y\right) \cdot 60}} \]
      3. times-frac81.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{x - y} \cdot \frac{z - t}{60}}} \]
      4. clear-num81.1%

        \[\leadsto \frac{1}{\frac{1}{x - y} \cdot \color{blue}{\frac{1}{\frac{60}{z - t}}}} \]
      5. div-inv81.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x - y}}{\frac{60}{z - t}}}} \]
      6. clear-num81.2%

        \[\leadsto \color{blue}{\frac{\frac{60}{z - t}}{\frac{1}{x - y}}} \]
      7. associate-/r/81.4%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\frac{60}{z - t}}}} \cdot \left(x - y\right) \]
      9. clear-num81.3%

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

        \[\leadsto \color{blue}{\frac{60}{z - t}} \cdot \left(x - y\right) \]
    10. Applied egg-rr81.4%

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

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

Alternative 14: 73.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.1999999999999999e-59

    1. Initial program 99.8%

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

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

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

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

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

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

    if -3.1999999999999999e-59 < a < 1.9500000000000001e-32

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 60}{z - t}} \]
    9. Step-by-step derivation
      1. clear-num81.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - t}{\left(x - y\right) \cdot 60}}} \]
      2. *-un-lft-identity81.0%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{x - y} \cdot \frac{z - t}{60}}} \]
      4. clear-num80.8%

        \[\leadsto \frac{1}{\frac{1}{x - y} \cdot \color{blue}{\frac{1}{\frac{60}{z - t}}}} \]
      5. div-inv80.8%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x - y}}{\frac{60}{z - t}}}} \]
      6. clear-num80.9%

        \[\leadsto \color{blue}{\frac{\frac{60}{z - t}}{\frac{1}{x - y}}} \]
      7. associate-/r/81.1%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\frac{60}{z - t}}}} \cdot \left(x - y\right) \]
      9. clear-num81.0%

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

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

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

    if 1.9500000000000001e-32 < a

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 15: 99.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 16: 56.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+19} \lor \neg \left(y \leq 10^{+141}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.2e19 or 1.00000000000000002e141 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -7.2e19 < y < 1.00000000000000002e141

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 17: 52.7% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7e-173 or 1e-172 < a

    1. Initial program 99.8%

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

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

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

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

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

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

    if -3.7e-173 < a < 1e-172

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{-173}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 10^{-172}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 18: 51.3% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023221 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

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

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