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

Percentage Accurate: 99.2% → 99.3%
Time: 12.6s
Alternatives: 20
Speedup: 1.1×

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 20 alternatives:

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

Initial Program: 99.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.3% accurate, 1.1× speedup?

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

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

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
    2. lift-*.f64N/A

      \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
    3. remove-double-negN/A

      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}}{z - t} + a \cdot 120 \]
    4. lift--.f64N/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}{\color{blue}{z - t}} + a \cdot 120 \]
    5. remove-double-negN/A

      \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
    6. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
    7. lift-*.f64N/A

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

      \[\leadsto \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
    9. lift-*.f64N/A

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z - t}\right)} \]
    11. lift-/.f64N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
    12. frac-2negN/A

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
    13. lower-/.f64N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
    14. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
    15. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
    16. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
    17. lower-*.f64N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
    18. metadata-evalN/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot \color{blue}{-60}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
    19. neg-sub0N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{0 - \left(z - t\right)}}\right) \]
    20. lift--.f64N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z - t\right)}}\right) \]
    21. sub-negN/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)}}\right) \]
    22. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)}}\right) \]
    23. associate--r+N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(0 - \left(\mathsf{neg}\left(t\right)\right)\right) - z}}\right) \]
    24. neg-sub0N/A

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - z}\right) \]
    25. remove-double-negN/A

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

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

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

Alternative 2: 56.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot 60}{z - t}\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+126}:\\
\;\;\;\;\frac{x - y}{z \cdot 0.016666666666666666}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
      3. lower--.f6474.2

        \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
    5. Simplified74.2%

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e19

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} \]
      4. lower--.f6455.1

        \[\leadsto \frac{60 \cdot x}{\color{blue}{z - t}} \]
    5. Simplified55.1%

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

    if -5e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} \]
      4. lower--.f6467.4

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{z - t}} \]
    8. Simplified67.4%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6476.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified76.1%

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

    if 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999977e126

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6477.9

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

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    9. Step-by-step derivation
      1. lower-/.f6461.1

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    11. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right)} \cdot \frac{60}{z} \]
      2. clear-numN/A

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z}{60}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z}{60}}} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z}{60}}} \]
      5. div-invN/A

        \[\leadsto \frac{x - y}{\color{blue}{z \cdot \frac{1}{60}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{x - y}{\color{blue}{z \cdot \frac{1}{60}}} \]
      7. metadata-eval61.3

        \[\leadsto \frac{x - y}{z \cdot \color{blue}{0.016666666666666666}} \]
    12. Applied egg-rr61.3%

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

    if 4.99999999999999977e126 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6459.4

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified59.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq -2 \cdot 10^{+256}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq -5 \cdot 10^{+19}:\\ \;\;\;\;\frac{x \cdot 60}{z - t}\\ \mathbf{elif}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq -1 \cdot 10^{-51}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq 2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq 5 \cdot 10^{+126}:\\ \;\;\;\;\frac{x - y}{z \cdot 0.016666666666666666}\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 56.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot 60}{z - t}\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+126}:\\
\;\;\;\;\frac{t\_1}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
      3. lower--.f6474.2

        \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
    5. Simplified74.2%

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e19

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} \]
      4. lower--.f6455.1

        \[\leadsto \frac{60 \cdot x}{\color{blue}{z - t}} \]
    5. Simplified55.1%

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

    if -5e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} \]
      4. lower--.f6467.4

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{z - t}} \]
    8. Simplified67.4%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6476.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified76.1%

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

    if 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999977e126

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot 60}}{z} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot 60}}{z} \]
      5. lower--.f6461.2

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

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

    if 4.99999999999999977e126 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6459.4

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified59.4%

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

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

Alternative 4: 56.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot 60}{z - t}\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
      3. lower--.f6474.2

        \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
    5. Simplified74.2%

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e19

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} \]
      4. lower--.f6455.1

        \[\leadsto \frac{60 \cdot x}{\color{blue}{z - t}} \]
    5. Simplified55.1%

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

    if -5e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} \]
      4. lower--.f6467.4

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{z - t}} \]
    8. Simplified67.4%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6476.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified76.1%

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

    if 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999977e126

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6477.9

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

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    9. Step-by-step derivation
      1. lower-/.f6461.1

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

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

    if 4.99999999999999977e126 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6459.4

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified59.4%

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

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

Alternative 5: 56.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+19}:\\
\;\;\;\;-60 \cdot \frac{x}{t - z}\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
      3. lower--.f6474.2

        \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
    5. Simplified74.2%

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e19

    1. Initial program 99.5%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6455.1

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified55.1%

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

    if -5e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} \]
      4. lower--.f6467.4

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{z - t}} \]
    8. Simplified67.4%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6476.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified76.1%

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

    if 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999977e126

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6477.9

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

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    9. Step-by-step derivation
      1. lower-/.f6461.1

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

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

    if 4.99999999999999977e126 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6459.4

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified59.4%

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

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

Alternative 6: 56.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+256}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+19}:\\ \;\;\;\;-60 \cdot \frac{x}{t - z}\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+126}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (/ (* (- x y) 60.0) (- z t))))
   (if (<= t_2 -2e+256)
     t_1
     (if (<= t_2 -5e+19)
       (* -60.0 (/ x (- t z)))
       (if (<= t_2 -1e-51)
         t_1
         (if (<= t_2 2e+53)
           (* a 120.0)
           (if (<= t_2 5e+126)
             (* (- x y) (/ 60.0 z))
             (* -60.0 (/ (- x y) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double t_2 = ((x - y) * 60.0) / (z - t);
	double tmp;
	if (t_2 <= -2e+256) {
		tmp = t_1;
	} else if (t_2 <= -5e+19) {
		tmp = -60.0 * (x / (t - z));
	} else if (t_2 <= -1e-51) {
		tmp = t_1;
	} else if (t_2 <= 2e+53) {
		tmp = a * 120.0;
	} else if (t_2 <= 5e+126) {
		tmp = (x - y) * (60.0 / z);
	} else {
		tmp = -60.0 * ((x - y) / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-60.0d0) * (y / (z - t))
    t_2 = ((x - y) * 60.0d0) / (z - t)
    if (t_2 <= (-2d+256)) then
        tmp = t_1
    else if (t_2 <= (-5d+19)) then
        tmp = (-60.0d0) * (x / (t - z))
    else if (t_2 <= (-1d-51)) then
        tmp = t_1
    else if (t_2 <= 2d+53) then
        tmp = a * 120.0d0
    else if (t_2 <= 5d+126) then
        tmp = (x - y) * (60.0d0 / z)
    else
        tmp = (-60.0d0) * ((x - y) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double t_2 = ((x - y) * 60.0) / (z - t);
	double tmp;
	if (t_2 <= -2e+256) {
		tmp = t_1;
	} else if (t_2 <= -5e+19) {
		tmp = -60.0 * (x / (t - z));
	} else if (t_2 <= -1e-51) {
		tmp = t_1;
	} else if (t_2 <= 2e+53) {
		tmp = a * 120.0;
	} else if (t_2 <= 5e+126) {
		tmp = (x - y) * (60.0 / z);
	} else {
		tmp = -60.0 * ((x - y) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	t_2 = ((x - y) * 60.0) / (z - t)
	tmp = 0
	if t_2 <= -2e+256:
		tmp = t_1
	elif t_2 <= -5e+19:
		tmp = -60.0 * (x / (t - z))
	elif t_2 <= -1e-51:
		tmp = t_1
	elif t_2 <= 2e+53:
		tmp = a * 120.0
	elif t_2 <= 5e+126:
		tmp = (x - y) * (60.0 / z)
	else:
		tmp = -60.0 * ((x - y) / t)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t))
	tmp = 0.0
	if (t_2 <= -2e+256)
		tmp = t_1;
	elseif (t_2 <= -5e+19)
		tmp = Float64(-60.0 * Float64(x / Float64(t - z)));
	elseif (t_2 <= -1e-51)
		tmp = t_1;
	elseif (t_2 <= 2e+53)
		tmp = Float64(a * 120.0);
	elseif (t_2 <= 5e+126)
		tmp = Float64(Float64(x - y) * Float64(60.0 / z));
	else
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	t_2 = ((x - y) * 60.0) / (z - t);
	tmp = 0.0;
	if (t_2 <= -2e+256)
		tmp = t_1;
	elseif (t_2 <= -5e+19)
		tmp = -60.0 * (x / (t - z));
	elseif (t_2 <= -1e-51)
		tmp = t_1;
	elseif (t_2 <= 2e+53)
		tmp = a * 120.0;
	elseif (t_2 <= 5e+126)
		tmp = (x - y) * (60.0 / z);
	else
		tmp = -60.0 * ((x - y) / t);
	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]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+256], t$95$1, If[LessEqual[t$95$2, -5e+19], N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-51], t$95$1, If[LessEqual[t$95$2, 2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+126], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+19}:\\
\;\;\;\;-60 \cdot \frac{x}{t - z}\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256 or -5e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
      3. lower--.f6470.7

        \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
    5. Simplified70.7%

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e19

    1. Initial program 99.5%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6455.1

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified55.1%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6476.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified76.1%

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

    if 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999977e126

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6477.9

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

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    9. Step-by-step derivation
      1. lower-/.f6461.1

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

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

    if 4.99999999999999977e126 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6459.4

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified59.4%

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

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

Alternative 7: 55.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\ t_3 := -60 \cdot \frac{x}{t - z}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+256}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+19}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t))))
        (t_2 (/ (* (- x y) 60.0) (- z t)))
        (t_3 (* -60.0 (/ x (- t z)))))
   (if (<= t_2 -2e+256)
     t_1
     (if (<= t_2 -5e+19)
       t_3
       (if (<= t_2 -1e-51) t_1 (if (<= t_2 2e+53) (* a 120.0) t_3))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double t_2 = ((x - y) * 60.0) / (z - t);
	double t_3 = -60.0 * (x / (t - z));
	double tmp;
	if (t_2 <= -2e+256) {
		tmp = t_1;
	} else if (t_2 <= -5e+19) {
		tmp = t_3;
	} else if (t_2 <= -1e-51) {
		tmp = t_1;
	} else if (t_2 <= 2e+53) {
		tmp = a * 120.0;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = (-60.0d0) * (y / (z - t))
    t_2 = ((x - y) * 60.0d0) / (z - t)
    t_3 = (-60.0d0) * (x / (t - z))
    if (t_2 <= (-2d+256)) then
        tmp = t_1
    else if (t_2 <= (-5d+19)) then
        tmp = t_3
    else if (t_2 <= (-1d-51)) then
        tmp = t_1
    else if (t_2 <= 2d+53) then
        tmp = a * 120.0d0
    else
        tmp = t_3
    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 t_2 = ((x - y) * 60.0) / (z - t);
	double t_3 = -60.0 * (x / (t - z));
	double tmp;
	if (t_2 <= -2e+256) {
		tmp = t_1;
	} else if (t_2 <= -5e+19) {
		tmp = t_3;
	} else if (t_2 <= -1e-51) {
		tmp = t_1;
	} else if (t_2 <= 2e+53) {
		tmp = a * 120.0;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	t_2 = ((x - y) * 60.0) / (z - t)
	t_3 = -60.0 * (x / (t - z))
	tmp = 0
	if t_2 <= -2e+256:
		tmp = t_1
	elif t_2 <= -5e+19:
		tmp = t_3
	elif t_2 <= -1e-51:
		tmp = t_1
	elif t_2 <= 2e+53:
		tmp = a * 120.0
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t))
	t_3 = Float64(-60.0 * Float64(x / Float64(t - z)))
	tmp = 0.0
	if (t_2 <= -2e+256)
		tmp = t_1;
	elseif (t_2 <= -5e+19)
		tmp = t_3;
	elseif (t_2 <= -1e-51)
		tmp = t_1;
	elseif (t_2 <= 2e+53)
		tmp = Float64(a * 120.0);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (y / (z - t));
	t_2 = ((x - y) * 60.0) / (z - t);
	t_3 = -60.0 * (x / (t - z));
	tmp = 0.0;
	if (t_2 <= -2e+256)
		tmp = t_1;
	elseif (t_2 <= -5e+19)
		tmp = t_3;
	elseif (t_2 <= -1e-51)
		tmp = t_1;
	elseif (t_2 <= 2e+53)
		tmp = a * 120.0;
	else
		tmp = t_3;
	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]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+256], t$95$1, If[LessEqual[t$95$2, -5e+19], t$95$3, If[LessEqual[t$95$2, -1e-51], t$95$1, If[LessEqual[t$95$2, 2e+53], N[(a * 120.0), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+19}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256 or -5e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
      3. lower--.f6470.7

        \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
    5. Simplified70.7%

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e19 or 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.6%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6450.9

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified50.9%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6476.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified76.1%

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

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

Alternative 8: 74.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-51}:\\ \;\;\;\;\frac{x - y}{\left(t - z\right) \cdot -0.016666666666666666}\\ \mathbf{elif}\;t\_1 \leq 10^{-49}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t\_1 \leq 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
   (if (<= t_1 -1e-51)
     (/ (- x y) (* (- t z) -0.016666666666666666))
     (if (<= t_1 1e-49)
       (* a 120.0)
       (if (<= t_1 1e+53)
         (fma -60.0 (/ (- x y) t) (* a 120.0))
         (* (- x y) (/ 60.0 (- z t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((x - y) * 60.0) / (z - t);
	double tmp;
	if (t_1 <= -1e-51) {
		tmp = (x - y) / ((t - z) * -0.016666666666666666);
	} else if (t_1 <= 1e-49) {
		tmp = a * 120.0;
	} else if (t_1 <= 1e+53) {
		tmp = fma(-60.0, ((x - y) / t), (a * 120.0));
	} else {
		tmp = (x - y) * (60.0 / (z - t));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t))
	tmp = 0.0
	if (t_1 <= -1e-51)
		tmp = Float64(Float64(x - y) / Float64(Float64(t - z) * -0.016666666666666666));
	elseif (t_1 <= 1e-49)
		tmp = Float64(a * 120.0);
	elseif (t_1 <= 1e+53)
		tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0));
	else
		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-51], N[(N[(x - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-49], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+53], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{x - y}{\left(t - z\right) \cdot -0.016666666666666666}\\

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

\mathbf{elif}\;t\_1 \leq 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6483.7

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right)} \cdot \frac{60}{z - t} \]
      2. lift--.f64N/A

        \[\leadsto \left(x - y\right) \cdot \frac{60}{\color{blue}{z - t}} \]
      3. clear-numN/A

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - t}{60}}} \]
      4. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - t}{60}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - t}{60}}} \]
      6. frac-2negN/A

        \[\leadsto \frac{x - y}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - t\right)\right)}{\mathsf{neg}\left(60\right)}}} \]
      7. metadata-evalN/A

        \[\leadsto \frac{x - y}{\frac{\mathsf{neg}\left(\left(z - t\right)\right)}{\color{blue}{-60}}} \]
      8. div-invN/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{1}{-60}}} \]
      9. lift--.f64N/A

        \[\leadsto \frac{x - y}{\left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right) \cdot \frac{1}{-60}} \]
      10. sub-negN/A

        \[\leadsto \frac{x - y}{\left(\mathsf{neg}\left(\color{blue}{\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)\right) \cdot \frac{1}{-60}} \]
      11. +-commutativeN/A

        \[\leadsto \frac{x - y}{\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)}\right)\right) \cdot \frac{1}{-60}} \]
      12. distribute-neg-inN/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(z\right)\right)\right)} \cdot \frac{1}{-60}} \]
      13. remove-double-negN/A

        \[\leadsto \frac{x - y}{\left(\color{blue}{t} + \left(\mathsf{neg}\left(z\right)\right)\right) \cdot \frac{1}{-60}} \]
      14. sub-negN/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(t - z\right)} \cdot \frac{1}{-60}} \]
      15. lift--.f64N/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(t - z\right)} \cdot \frac{1}{-60}} \]
      16. lower-*.f64N/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(t - z\right) \cdot \frac{1}{-60}}} \]
      17. metadata-eval83.8

        \[\leadsto \frac{x - y}{\left(t - z\right) \cdot \color{blue}{-0.016666666666666666}} \]
    9. Applied egg-rr83.8%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999936e-50

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6483.4

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified83.4%

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

    if 9.99999999999999936e-50 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999999e52

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-60, \color{blue}{\frac{x - y}{t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

    if 9.9999999999999999e52 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6484.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq -1 \cdot 10^{-51}:\\ \;\;\;\;\frac{x - y}{\left(t - z\right) \cdot -0.016666666666666666}\\ \mathbf{elif}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq 10^{-49}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;\frac{\left(x - y\right) \cdot 60}{z - t} \leq 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 54.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+116}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x - y}{z}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z}} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z}} \]
      5. lower-/.f6461.4

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

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000002e116

    1. Initial program 99.4%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6469.5

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified69.5%

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

      \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    9. Step-by-step derivation
      1. lower-/.f6448.8

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    10. Simplified48.8%

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

    if -1.00000000000000002e116 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000006e122

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6459.8

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified59.8%

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

    if 4.00000000000000006e122 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} \]
      4. lower--.f6443.2

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} \]
      3. lower-*.f6438.1

        \[\leadsto \frac{\color{blue}{60 \cdot y}}{t} \]
    11. Simplified38.1%

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

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

Alternative 10: 54.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+116}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+264}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e256 or 5.00000000000000033e264 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x - y}{z}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
      2. *-commutativeN/A

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

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z}} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z}} \]
      5. lower-/.f6451.5

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

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

    if -2.0000000000000001e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000002e116

    1. Initial program 99.4%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6469.5

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified69.5%

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

      \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    9. Step-by-step derivation
      1. lower-/.f6448.8

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    10. Simplified48.8%

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

    if -1.00000000000000002e116 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000033e264

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6454.9

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified54.9%

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

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

Alternative 11: 74.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{x - y}{\left(t - z\right) \cdot -0.016666666666666666}\\

\mathbf{elif}\;t\_1 \leq 10000000000000:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6483.7

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right)} \cdot \frac{60}{z - t} \]
      2. lift--.f64N/A

        \[\leadsto \left(x - y\right) \cdot \frac{60}{\color{blue}{z - t}} \]
      3. clear-numN/A

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - t}{60}}} \]
      4. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - t}{60}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - t}{60}}} \]
      6. frac-2negN/A

        \[\leadsto \frac{x - y}{\color{blue}{\frac{\mathsf{neg}\left(\left(z - t\right)\right)}{\mathsf{neg}\left(60\right)}}} \]
      7. metadata-evalN/A

        \[\leadsto \frac{x - y}{\frac{\mathsf{neg}\left(\left(z - t\right)\right)}{\color{blue}{-60}}} \]
      8. div-invN/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(\mathsf{neg}\left(\left(z - t\right)\right)\right) \cdot \frac{1}{-60}}} \]
      9. lift--.f64N/A

        \[\leadsto \frac{x - y}{\left(\mathsf{neg}\left(\color{blue}{\left(z - t\right)}\right)\right) \cdot \frac{1}{-60}} \]
      10. sub-negN/A

        \[\leadsto \frac{x - y}{\left(\mathsf{neg}\left(\color{blue}{\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)}\right)\right) \cdot \frac{1}{-60}} \]
      11. +-commutativeN/A

        \[\leadsto \frac{x - y}{\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)}\right)\right) \cdot \frac{1}{-60}} \]
      12. distribute-neg-inN/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(z\right)\right)\right)} \cdot \frac{1}{-60}} \]
      13. remove-double-negN/A

        \[\leadsto \frac{x - y}{\left(\color{blue}{t} + \left(\mathsf{neg}\left(z\right)\right)\right) \cdot \frac{1}{-60}} \]
      14. sub-negN/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(t - z\right)} \cdot \frac{1}{-60}} \]
      15. lift--.f64N/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(t - z\right)} \cdot \frac{1}{-60}} \]
      16. lower-*.f64N/A

        \[\leadsto \frac{x - y}{\color{blue}{\left(t - z\right) \cdot \frac{1}{-60}}} \]
      17. metadata-eval83.8

        \[\leadsto \frac{x - y}{\left(t - z\right) \cdot \color{blue}{-0.016666666666666666}} \]
    9. Applied egg-rr83.8%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e13

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6479.0

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified79.0%

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

    if 1e13 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6482.4

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

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

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

Alternative 12: 74.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-51}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

\mathbf{elif}\;t\_1 \leq 10000000000000:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      6. lower-/.f6483.7

        \[\leadsto \color{blue}{\frac{x - y}{z - t}} \cdot 60 \]
    7. Applied egg-rr83.7%

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e13

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6479.0

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified79.0%

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

    if 1e13 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6482.4

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

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

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

Alternative 13: 74.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10000000000000:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e-51 or 1e13 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6483.1

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

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

    if -1e-51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e13

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6479.0

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified79.0%

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

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

Alternative 14: 57.3% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e-7 or 2e53 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.6%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6447.8

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified47.8%

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

    if -1.9999999999999999e-7 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e53

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6472.7

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified72.7%

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

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

Alternative 15: 54.3% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000002e116 or 2.00000000000000007e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.6%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      4. div-invN/A

        \[\leadsto \color{blue}{\left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t}} + a \cdot 120 \]
      5. lift-*.f64N/A

        \[\leadsto \left(60 \cdot \left(x - y\right)\right) \cdot \frac{1}{z - t} + \color{blue}{a \cdot 120} \]
      6. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      8. div-invN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}} + a \cdot 120 \]
      9. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      10. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)\right)} \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)} + a \cdot 120 \]
      12. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\mathsf{neg}\left(60\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\left(z - t\right)\right)}\right)} + a \cdot 120 \]
      13. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t - z}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t - z}} \]
      3. lower--.f6453.1

        \[\leadsto -60 \cdot \frac{x}{\color{blue}{t - z}} \]
    7. Simplified53.1%

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

      \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    9. Step-by-step derivation
      1. lower-/.f6430.7

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    10. Simplified30.7%

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

    if -1.00000000000000002e116 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000007e139

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6458.8

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified58.8%

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

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

Alternative 16: 83.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, 120, \frac{x \cdot -60}{t - z}\right)\\ \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-61}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma a 120.0 (/ (* x -60.0) (- t z)))))
   (if (<= (* a 120.0) -5e-63)
     t_1
     (if (<= (* a 120.0) 4e-61) (* (- x y) (/ 60.0 (- z t))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(a, 120.0, ((x * -60.0) / (t - z)));
	double tmp;
	if ((a * 120.0) <= -5e-63) {
		tmp = t_1;
	} else if ((a * 120.0) <= 4e-61) {
		tmp = (x - y) * (60.0 / (z - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(a, 120.0, Float64(Float64(x * -60.0) / Float64(t - z)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -5e-63)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 4e-61)
		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * 120.0 + N[(N[(x * -60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-63], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-61], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 120, \frac{x \cdot -60}{t - z}\right)\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -5.0000000000000002e-63 or 4.0000000000000002e-61 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}}{z - t} + a \cdot 120 \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      6. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      7. lift-*.f64N/A

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

        \[\leadsto \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      9. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z - t}\right)} \]
      11. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
      12. frac-2negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
      13. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
      14. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      16. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      17. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      18. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot \color{blue}{-60}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      19. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{0 - \left(z - t\right)}}\right) \]
      20. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z - t\right)}}\right) \]
      21. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)}}\right) \]
      22. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)}}\right) \]
      23. associate--r+N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(0 - \left(\mathsf{neg}\left(t\right)\right)\right) - z}}\right) \]
      24. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - z}\right) \]
      25. remove-double-negN/A

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{-60 \cdot \frac{x}{t - z}}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-60 \cdot x}{t - z}}\right) \]
      2. metadata-evalN/A

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

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{-1 \cdot \left(60 \cdot x\right)}}{t - z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-1 \cdot \left(60 \cdot x\right)}{t - z}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(-1 \cdot 60\right) \cdot x}}{t - z}\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{-60} \cdot x}{t - z}\right) \]
      7. lower-*.f64N/A

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

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

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

    if -5.0000000000000002e-63 < (*.f64 a #s(literal 120 binary64)) < 4.0000000000000002e-61

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6487.2

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

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

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

Alternative 17: 83.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(60, \frac{x}{z - t}, a \cdot 120\right)\\ \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-61}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma 60.0 (/ x (- z t)) (* a 120.0))))
   (if (<= (* a 120.0) -5e-63)
     t_1
     (if (<= (* a 120.0) 4e-61) (* (- x y) (/ 60.0 (- z t))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(60.0, (x / (z - t)), (a * 120.0));
	double tmp;
	if ((a * 120.0) <= -5e-63) {
		tmp = t_1;
	} else if ((a * 120.0) <= 4e-61) {
		tmp = (x - y) * (60.0 / (z - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(60.0, Float64(x / Float64(z - t)), Float64(a * 120.0))
	tmp = 0.0
	if (Float64(a * 120.0) <= -5e-63)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 4e-61)
		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-63], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-61], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x}{z - t}, a \cdot 120\right)\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -5.0000000000000002e-63 or 4.0000000000000002e-61 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x}{z - t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

    if -5.0000000000000002e-63 < (*.f64 a #s(literal 120 binary64)) < 4.0000000000000002e-61

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      2. lift--.f64N/A

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
      6. lower-/.f6487.2

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

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

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

Alternative 18: 52.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6466.2

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

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

    if -4.00000000000000001e-136 < (*.f64 a #s(literal 120 binary64)) < 1e-61

    1. Initial program 99.6%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x - y}{z}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
      4. lower-*.f6434.8

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
    8. Simplified34.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-136}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-61}:\\ \;\;\;\;\frac{x \cdot 60}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 87.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, 120, \frac{y \cdot 60}{t - z}\right)\\ \mathbf{if}\;y \leq -8.2 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{x \cdot -60}{t - z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma a 120.0 (/ (* y 60.0) (- t z)))))
   (if (<= y -8.2e+155)
     t_1
     (if (<= y 1.08e+71) (fma a 120.0 (/ (* x -60.0) (- t z))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(a, 120.0, ((y * 60.0) / (t - z)));
	double tmp;
	if (y <= -8.2e+155) {
		tmp = t_1;
	} else if (y <= 1.08e+71) {
		tmp = fma(a, 120.0, ((x * -60.0) / (t - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(a, 120.0, Float64(Float64(y * 60.0) / Float64(t - z)))
	tmp = 0.0
	if (y <= -8.2e+155)
		tmp = t_1;
	elseif (y <= 1.08e+71)
		tmp = fma(a, 120.0, Float64(Float64(x * -60.0) / Float64(t - z)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * 120.0 + N[(N[(y * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e+155], t$95$1, If[LessEqual[y, 1.08e+71], N[(a * 120.0 + N[(N[(x * -60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 120, \frac{y \cdot 60}{t - z}\right)\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.08 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x \cdot -60}{t - z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.1999999999999996e155 or 1.08e71 < y

    1. Initial program 99.6%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}}{z - t} + a \cdot 120 \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      6. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      7. lift-*.f64N/A

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

        \[\leadsto \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      9. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z - t}\right)} \]
      11. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
      12. frac-2negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
      13. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
      14. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      16. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      17. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      18. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot \color{blue}{-60}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      19. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{0 - \left(z - t\right)}}\right) \]
      20. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z - t\right)}}\right) \]
      21. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)}}\right) \]
      22. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)}}\right) \]
      23. associate--r+N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(0 - \left(\mathsf{neg}\left(t\right)\right)\right) - z}}\right) \]
      24. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - z}\right) \]
      25. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{t} - z}\right) \]
      26. lower--.f6499.7

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{60 \cdot y}}{t - z}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

    if -8.1999999999999996e155 < y < 1.08e71

    1. Initial program 99.8%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} + a \cdot 120 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      3. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}}{z - t} + a \cdot 120 \]
      4. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)\right)\right)}{\color{blue}{z - t}} + a \cdot 120 \]
      5. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} + a \cdot 120 \]
      6. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      7. lift-*.f64N/A

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

        \[\leadsto \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      9. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z - t}\right)} \]
      11. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
      12. frac-2negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
      13. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{\mathsf{neg}\left(60 \cdot \left(x - y\right)\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}}\right) \]
      14. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{60 \cdot \left(x - y\right)}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{\left(x - y\right) \cdot 60}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      16. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      17. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(x - y\right) \cdot \left(\mathsf{neg}\left(60\right)\right)}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      18. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot \color{blue}{-60}}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
      19. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{0 - \left(z - t\right)}}\right) \]
      20. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z - t\right)}}\right) \]
      21. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)}}\right) \]
      22. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{0 - \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)}}\right) \]
      23. associate--r+N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(0 - \left(\mathsf{neg}\left(t\right)\right)\right) - z}}\right) \]
      24. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - z}\right) \]
      25. remove-double-negN/A

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{-60 \cdot \frac{x}{t - z}}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-60 \cdot x}{t - z}}\right) \]
      2. metadata-evalN/A

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

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{-1 \cdot \left(60 \cdot x\right)}}{t - z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-1 \cdot \left(60 \cdot x\right)}{t - z}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{\left(-1 \cdot 60\right) \cdot x}}{t - z}\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{-60} \cdot x}{t - z}\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{-60 \cdot x}}{t - z}\right) \]
      8. lower--.f6490.9

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{-60 \cdot x}{t - z}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.3%

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

Alternative 20: 50.9% accurate, 5.2× 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.7%

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  4. Step-by-step derivation
    1. lower-*.f6446.2

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

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

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

Developer Target 1: 99.8% accurate, 0.8× 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 2024207 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))

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