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

Percentage Accurate: 99.4% → 99.4%
Time: 13.3s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 1.1× speedup?

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

\\
\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z - t}\right)
\end{array}
Derivation
  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. +-commutativeN/A

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

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

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

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

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

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

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

Alternative 2: 74.2% accurate, 0.3× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{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)) < -0.050000000000000003

    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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{z - t}}{x - y}} \]
      6. --lowering--.f6478.6

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

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

    if -0.050000000000000003 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e-92

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6483.5

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

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

    if 5.00000000000000011e-92 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000004e55

    1. Initial program 99.9%

      \[\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}} + a \cdot 120 \]
    4. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot x}{t}} + 120 \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot -60}}{t} + 120 \cdot a \]
      3. associate-/l*N/A

        \[\leadsto \color{blue}{x \cdot \frac{-60}{t}} + 120 \cdot a \]
      4. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{-60}{t}}, 120 \cdot a\right) \]
      6. *-lowering-*.f6468.2

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{-60}{t}, 120 \cdot a\right)} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{120 \cdot a + x \cdot \frac{-60}{t}} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{a \cdot 120} + x \cdot \frac{-60}{t} \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, x \cdot \frac{-60}{t}\right)} \]
      4. clear-numN/A

        \[\leadsto \mathsf{fma}\left(a, 120, x \cdot \color{blue}{\frac{1}{\frac{t}{-60}}}\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{x}{\frac{t}{-60}}}\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{x}{\color{blue}{t \cdot \frac{1}{-60}}}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{x}{\color{blue}{t \cdot \frac{1}{-60}}}\right) \]
      9. metadata-eval68.2

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{x}{t \cdot \color{blue}{-0.016666666666666666}}\right) \]
    10. Applied egg-rr68.2%

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

    if 4.00000000000000004e55 < (/.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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x - y}}{z - t} \cdot 60 \]
      6. --lowering--.f6488.3

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

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

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

Alternative 3: 74.3% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{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)) < -0.050000000000000003

    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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{z - t}}{x - y}} \]
      6. --lowering--.f6478.6

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

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

    if -0.050000000000000003 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999929e-40

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6481.9

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

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

    if 9.99999999999999929e-40 < (/.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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x - y}}{z - t} \cdot 60 \]
      6. --lowering--.f6476.7

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

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

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

Alternative 4: 74.1% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{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)) < -0.050000000000000003

    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. /-lowering-/.f64N/A

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

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

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

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

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

    if -0.050000000000000003 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999929e-40

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6481.9

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

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

    if 9.99999999999999929e-40 < (/.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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x - y}}{z - t} \cdot 60 \]
      6. --lowering--.f6476.7

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

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

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

Alternative 5: 74.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -0.05:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-39}:\\ \;\;\;\;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 y) (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_2 -0.05) t_1 (if (<= t_2 1e-39) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -0.05) {
		tmp = t_1;
	} else if (t_2 <= 1e-39) {
		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 - y) / (z - t))
    t_2 = (60.0d0 * (x - y)) / (z - t)
    if (t_2 <= (-0.05d0)) then
        tmp = t_1
    else if (t_2 <= 1d-39) 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 - y) / (z - t));
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -0.05) {
		tmp = t_1;
	} else if (t_2 <= 1e-39) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	t_2 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if t_2 <= -0.05:
		tmp = t_1
	elif t_2 <= 1e-39:
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))
	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_2 <= -0.05)
		tmp = t_1;
	elseif (t_2 <= 1e-39)
		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 - y) / (z - t));
	t_2 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_2 <= -0.05)
		tmp = t_1;
	elseif (t_2 <= 1e-39)
		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[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -0.05], t$95$1, If[LessEqual[t$95$2, 1e-39], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 10^{-39}:\\
\;\;\;\;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)) < -0.050000000000000003 or 9.99999999999999929e-40 < (/.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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x - y}}{z - t} \cdot 60 \]
      6. --lowering--.f6477.5

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

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

    if -0.050000000000000003 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999929e-40

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6481.9

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

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

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

Alternative 6: 74.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -0.05:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-39}:\\ \;\;\;\;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 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_2 -0.05) t_1 (if (<= t_2 1e-39) (* 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 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -0.05) {
		tmp = t_1;
	} else if (t_2 <= 1e-39) {
		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 = (60.0d0 * (x - y)) / (z - t)
    if (t_2 <= (-0.05d0)) then
        tmp = t_1
    else if (t_2 <= 1d-39) 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 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -0.05) {
		tmp = t_1;
	} else if (t_2 <= 1e-39) {
		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 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if t_2 <= -0.05:
		tmp = t_1
	elif t_2 <= 1e-39:
		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(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_2 <= -0.05)
		tmp = t_1;
	elseif (t_2 <= 1e-39)
		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 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_2 <= -0.05)
		tmp = t_1;
	elseif (t_2 <= 1e-39)
		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[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -0.05], t$95$1, If[LessEqual[t$95$2, 1e-39], 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{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -0.05:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-39}:\\
\;\;\;\;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)) < -0.050000000000000003 or 9.99999999999999929e-40 < (/.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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    if -0.050000000000000003 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999929e-40

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6481.9

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

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

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

Alternative 7: 60.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+55}:\\ \;\;\;\;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 y) z))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_2 -2e+88) t_1 (if (<= t_2 4e+55) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / z);
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -2e+88) {
		tmp = t_1;
	} else if (t_2 <= 4e+55) {
		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 - y) / z)
    t_2 = (60.0d0 * (x - y)) / (z - t)
    if (t_2 <= (-2d+88)) then
        tmp = t_1
    else if (t_2 <= 4d+55) 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 - y) / z);
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -2e+88) {
		tmp = t_1;
	} else if (t_2 <= 4e+55) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / z)
	t_2 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if t_2 <= -2e+88:
		tmp = t_1
	elif t_2 <= 4e+55:
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / z))
	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_2 <= -2e+88)
		tmp = t_1;
	elseif (t_2 <= 4e+55)
		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 - y) / z);
	t_2 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_2 <= -2e+88)
		tmp = t_1;
	elseif (t_2 <= 4e+55)
		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[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+88], t$95$1, If[LessEqual[t$95$2, 4e+55], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+55}:\\
\;\;\;\;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.99999999999999992e88 or 4.00000000000000004e55 < (/.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. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{60 \cdot \color{blue}{\left(x - y\right)}}{z - t} \]
      5. --lowering--.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. associate-*l/N/A

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

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{z - t}}{x - y}} \]
      6. --lowering--.f6487.1

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. --lowering--.f6457.9

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    10. Simplified57.9%

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

    if -1.99999999999999992e88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000004e55

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6470.6

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified70.6%

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

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

Alternative 8: 58.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+55}:\\
\;\;\;\;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.99999999999999992e88 or 4.00000000000000004e55 < (/.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 y around inf

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

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

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

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

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

    if -1.99999999999999992e88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000004e55

    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}{120 \cdot a} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6470.6

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified70.6%

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

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

Alternative 9: 54.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+186}:\\
\;\;\;\;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)) < -9.9999999999999993e158 or 9.9999999999999998e185 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.5%

      \[\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. *-lowering-*.f64N/A

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

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

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

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

      \[\leadsto -60 \cdot \color{blue}{\frac{y}{z}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6442.1

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

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

    if -9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999998e185

    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. *-lowering-*.f6459.5

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

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

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

Alternative 10: 83.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.8000000000000006e-81

    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. +-commutativeN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{60 \cdot \frac{x - y}{z}}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

    if -9.8000000000000006e-81 < z < 3.89999999999999978e-47

    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. +-commutativeN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{-60 \cdot \frac{x - y}{t}}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

    if 3.89999999999999978e-47 < z

    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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

Alternative 11: 83.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-79}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1e-79

    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. +-commutativeN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{60 \cdot \frac{x - y}{z}}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

    if -1e-79 < z < 1.49999999999999994e-46

    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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

    if 1.49999999999999994e-46 < z

    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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

Alternative 12: 83.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1999999999999999e-80 or 7.19999999999999982e-47 < z

    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}{60 \cdot \frac{x - y}{z} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. accelerator-lowering-fma.f64N/A

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

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

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

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

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

    if -3.1999999999999999e-80 < z < 7.19999999999999982e-47

    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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

Alternative 13: 76.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x}{z}, a \cdot 120\right)\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.49999999999999917e-81 or 5.5000000000000002e-47 < z

    1. Initial program 99.7%

      \[\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}} + a \cdot 120 \]
    4. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x}{z}}, 120 \cdot a\right) \]
      3. *-lowering-*.f6474.3

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

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

    if -9.49999999999999917e-81 < z < 5.5000000000000002e-47

    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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

Alternative 14: 51.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.3 \cdot 10^{+138}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 9.2 \cdot 10^{+266}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.50000000000000019e111 or 2.30000000000000008e138 < x < 9.2000000000000004e266

    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. /-lowering-/.f64N/A

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

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

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

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

      \[\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. /-lowering-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z} \]
      4. --lowering--.f6455.1

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

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

      \[\leadsto \frac{60 \cdot \color{blue}{x}}{z} \]
    10. Step-by-step derivation
      1. Simplified51.0%

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

      if -9.50000000000000019e111 < x < 2.30000000000000008e138

      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. *-lowering-*.f6460.6

          \[\leadsto \color{blue}{120 \cdot a} \]
      5. Simplified60.6%

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

      if 9.2000000000000004e266 < x

      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. /-lowering-/.f64N/A

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

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

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

          \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{z - t}} \]
      5. Simplified74.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. associate-*r/N/A

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{-60 \cdot \frac{x}{t}} \]
        2. /-lowering-/.f6465.3

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

        \[\leadsto \color{blue}{-60 \cdot \frac{x}{t}} \]
      12. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{x}{t} \cdot -60} \]
        2. metadata-evalN/A

          \[\leadsto \frac{x}{t} \cdot \color{blue}{\frac{1}{\frac{-1}{60}}} \]
        3. times-fracN/A

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

          \[\leadsto \color{blue}{x \cdot \frac{1}{t \cdot \frac{-1}{60}}} \]
        5. *-commutativeN/A

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

          \[\leadsto \color{blue}{\frac{1}{t \cdot \frac{-1}{60}} \cdot x} \]
        7. *-commutativeN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{-1}{60} \cdot t}} \cdot x \]
        8. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{1}{\frac{-1}{60}}}{t}} \cdot x \]
        9. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{-60}}{t} \cdot x \]
        10. /-lowering-/.f6465.6

          \[\leadsto \color{blue}{\frac{-60}{t}} \cdot x \]
      13. Applied egg-rr65.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+111}:\\ \;\;\;\;\frac{60 \cdot x}{z}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+138}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+266}:\\ \;\;\;\;\frac{60 \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-60}{t}\\ \end{array} \]
    13. Add Preprocessing

    Alternative 15: 58.3% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;x \leq -1.5 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+140}:\\ \;\;\;\;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 (- z t)))))
       (if (<= x -1.5e+111) t_1 (if (<= x 2.4e+140) (* a 120.0) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = 60.0 * (x / (z - t));
    	double tmp;
    	if (x <= -1.5e+111) {
    		tmp = t_1;
    	} else if (x <= 2.4e+140) {
    		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) :: tmp
        t_1 = 60.0d0 * (x / (z - t))
        if (x <= (-1.5d+111)) then
            tmp = t_1
        else if (x <= 2.4d+140) 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 / (z - t));
    	double tmp;
    	if (x <= -1.5e+111) {
    		tmp = t_1;
    	} else if (x <= 2.4e+140) {
    		tmp = a * 120.0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = 60.0 * (x / (z - t))
    	tmp = 0
    	if x <= -1.5e+111:
    		tmp = t_1
    	elif x <= 2.4e+140:
    		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(z - t)))
    	tmp = 0.0
    	if (x <= -1.5e+111)
    		tmp = t_1;
    	elseif (x <= 2.4e+140)
    		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 / (z - t));
    	tmp = 0.0;
    	if (x <= -1.5e+111)
    		tmp = t_1;
    	elseif (x <= 2.4e+140)
    		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[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+111], t$95$1, If[LessEqual[x, 2.4e+140], N[(a * 120.0), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := 60 \cdot \frac{x}{z - t}\\
    \mathbf{if}\;x \leq -1.5 \cdot 10^{+111}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 2.4 \cdot 10^{+140}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.5e111 or 2.4e140 < x

      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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.5e111 < x < 2.4e140

      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. *-lowering-*.f6460.6

          \[\leadsto \color{blue}{120 \cdot a} \]
      5. Simplified60.6%

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

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

    Alternative 16: 52.1% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{x}{t}\\ \mathbf{if}\;x \leq -4.1 \cdot 10^{+157}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+252}:\\ \;\;\;\;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))))
       (if (<= x -4.1e+157) t_1 (if (<= x 2.3e+252) (* 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 tmp;
    	if (x <= -4.1e+157) {
    		tmp = t_1;
    	} else if (x <= 2.3e+252) {
    		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) :: tmp
        t_1 = (-60.0d0) * (x / t)
        if (x <= (-4.1d+157)) then
            tmp = t_1
        else if (x <= 2.3d+252) 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 tmp;
    	if (x <= -4.1e+157) {
    		tmp = t_1;
    	} else if (x <= 2.3e+252) {
    		tmp = a * 120.0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = -60.0 * (x / t)
    	tmp = 0
    	if x <= -4.1e+157:
    		tmp = t_1
    	elif x <= 2.3e+252:
    		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))
    	tmp = 0.0
    	if (x <= -4.1e+157)
    		tmp = t_1;
    	elseif (x <= 2.3e+252)
    		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);
    	tmp = 0.0;
    	if (x <= -4.1e+157)
    		tmp = t_1;
    	elseif (x <= 2.3e+252)
    		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]}, If[LessEqual[x, -4.1e+157], t$95$1, If[LessEqual[x, 2.3e+252], N[(a * 120.0), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := -60 \cdot \frac{x}{t}\\
    \mathbf{if}\;x \leq -4.1 \cdot 10^{+157}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 2.3 \cdot 10^{+252}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -4.10000000000000016e157 or 2.3e252 < x

      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. /-lowering-/.f64N/A

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

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

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

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

        \[\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. associate-*r/N/A

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

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

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

          \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot -60}}{t} \]
        5. --lowering--.f6457.5

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

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

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

          \[\leadsto \color{blue}{-60 \cdot \frac{x}{t}} \]
        2. /-lowering-/.f6450.7

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

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

      if -4.10000000000000016e157 < x < 2.3e252

      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. *-lowering-*.f6454.3

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

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

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

    Alternative 17: 50.6% 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.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. *-lowering-*.f6447.9

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    6. Final simplification47.9%

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