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

Percentage Accurate: 99.4% → 99.8%
Time: 13.1s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 58.4% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq -200000:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\

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

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

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


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

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} \]
      4. --lowering--.f6469.6

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e252 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e96

    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--.f6457.3

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

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

    if -2.0000000000000001e96 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e5

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e5 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000002e75

    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-*.f6472.2

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

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

    if 5.0000000000000002e75 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.9999999999999999e155

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. 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. *-commutativeN/A

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

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

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    9. 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--.f6461.4

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

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

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

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

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

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

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    12. Applied egg-rr61.6%

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

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

    1. Initial program 95.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 \frac{\color{blue}{\left(x - y\right) \cdot 60}}{z - t} + a \cdot 120 \]
      2. associate-/l*N/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. 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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \frac{\left(x - y\right) \cdot 60}{\color{blue}{z}} \]
    10. Recombined 6 regimes into one program.
    11. Final simplification67.0%

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

    Alternative 3: 54.5% 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 -2 \cdot 10^{+252}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+129}:\\ \;\;\;\;y \cdot \frac{60}{t}\\ \mathbf{elif}\;t\_1 \leq 10^{+259}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot 0.016666666666666666}\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
       (if (<= t_1 -2e+252)
         (* x (/ 60.0 z))
         (if (<= t_1 -5e+129)
           (* y (/ 60.0 t))
           (if (<= t_1 1e+259) (* a 120.0) (/ x (* z 0.016666666666666666)))))))
    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 <= -2e+252) {
    		tmp = x * (60.0 / z);
    	} else if (t_1 <= -5e+129) {
    		tmp = y * (60.0 / t);
    	} else if (t_1 <= 1e+259) {
    		tmp = a * 120.0;
    	} else {
    		tmp = x / (z * 0.016666666666666666);
    	}
    	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 <= (-2d+252)) then
            tmp = x * (60.0d0 / z)
        else if (t_1 <= (-5d+129)) then
            tmp = y * (60.0d0 / t)
        else if (t_1 <= 1d+259) then
            tmp = a * 120.0d0
        else
            tmp = x / (z * 0.016666666666666666d0)
        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 <= -2e+252) {
    		tmp = x * (60.0 / z);
    	} else if (t_1 <= -5e+129) {
    		tmp = y * (60.0 / t);
    	} else if (t_1 <= 1e+259) {
    		tmp = a * 120.0;
    	} else {
    		tmp = x / (z * 0.016666666666666666);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (60.0 * (x - y)) / (z - t)
    	tmp = 0
    	if t_1 <= -2e+252:
    		tmp = x * (60.0 / z)
    	elif t_1 <= -5e+129:
    		tmp = y * (60.0 / t)
    	elif t_1 <= 1e+259:
    		tmp = a * 120.0
    	else:
    		tmp = x / (z * 0.016666666666666666)
    	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 <= -2e+252)
    		tmp = Float64(x * Float64(60.0 / z));
    	elseif (t_1 <= -5e+129)
    		tmp = Float64(y * Float64(60.0 / t));
    	elseif (t_1 <= 1e+259)
    		tmp = Float64(a * 120.0);
    	else
    		tmp = Float64(x / Float64(z * 0.016666666666666666));
    	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 <= -2e+252)
    		tmp = x * (60.0 / z);
    	elseif (t_1 <= -5e+129)
    		tmp = y * (60.0 / t);
    	elseif (t_1 <= 1e+259)
    		tmp = a * 120.0;
    	else
    		tmp = x / (z * 0.016666666666666666);
    	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, -2e+252], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+129], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+259], N[(a * 120.0), $MachinePrecision], N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+252}:\\
    \;\;\;\;x \cdot \frac{60}{z}\\
    
    \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+129}:\\
    \;\;\;\;y \cdot \frac{60}{t}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+259}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{z \cdot 0.016666666666666666}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000002e252

      1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \frac{\color{blue}{60}}{z} \]
        9. /-lowering-/.f6448.8

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

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

      if -2.0000000000000002e252 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e129

      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      6. 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. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      9. 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--.f6447.6

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \frac{\color{blue}{60}}{t} \]
        8. /-lowering-/.f6434.5

          \[\leadsto y \cdot \color{blue}{\frac{60}{t}} \]
      13. Simplified34.5%

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

      if -5.0000000000000003e129 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.999999999999999e258

      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-*.f6455.5

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

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

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

      1. Initial program 92.4%

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

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

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

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

          \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} \]
        4. --lowering--.f6462.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \frac{\color{blue}{60}}{z} \]
        9. /-lowering-/.f6461.9

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

        \[\leadsto \color{blue}{x \cdot \frac{60}{z}} \]
      11. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{60}}} \]
        2. un-div-invN/A

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

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

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

          \[\leadsto \frac{x}{\color{blue}{z \cdot \frac{1}{60}}} \]
        6. metadata-eval62.0

          \[\leadsto \frac{x}{z \cdot \color{blue}{0.016666666666666666}} \]
      12. Applied egg-rr62.0%

        \[\leadsto \color{blue}{\frac{x}{z \cdot 0.016666666666666666}} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification53.2%

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

    Alternative 4: 54.5% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{60}{z}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+252}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+129}:\\ \;\;\;\;y \cdot \frac{60}{t}\\ \mathbf{elif}\;t\_2 \leq 10^{+259}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* x (/ 60.0 z))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
       (if (<= t_2 -2e+252)
         t_1
         (if (<= t_2 -5e+129)
           (* y (/ 60.0 t))
           (if (<= t_2 1e+259) (* a 120.0) t_1)))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x * (60.0 / z);
    	double t_2 = (60.0 * (x - y)) / (z - t);
    	double tmp;
    	if (t_2 <= -2e+252) {
    		tmp = t_1;
    	} else if (t_2 <= -5e+129) {
    		tmp = y * (60.0 / t);
    	} else if (t_2 <= 1e+259) {
    		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 * (60.0d0 / z)
        t_2 = (60.0d0 * (x - y)) / (z - t)
        if (t_2 <= (-2d+252)) then
            tmp = t_1
        else if (t_2 <= (-5d+129)) then
            tmp = y * (60.0d0 / t)
        else if (t_2 <= 1d+259) 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 * (60.0 / z);
    	double t_2 = (60.0 * (x - y)) / (z - t);
    	double tmp;
    	if (t_2 <= -2e+252) {
    		tmp = t_1;
    	} else if (t_2 <= -5e+129) {
    		tmp = y * (60.0 / t);
    	} else if (t_2 <= 1e+259) {
    		tmp = a * 120.0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = x * (60.0 / z)
    	t_2 = (60.0 * (x - y)) / (z - t)
    	tmp = 0
    	if t_2 <= -2e+252:
    		tmp = t_1
    	elif t_2 <= -5e+129:
    		tmp = y * (60.0 / t)
    	elif t_2 <= 1e+259:
    		tmp = a * 120.0
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x * Float64(60.0 / z))
    	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
    	tmp = 0.0
    	if (t_2 <= -2e+252)
    		tmp = t_1;
    	elseif (t_2 <= -5e+129)
    		tmp = Float64(y * Float64(60.0 / t));
    	elseif (t_2 <= 1e+259)
    		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 * (60.0 / z);
    	t_2 = (60.0 * (x - y)) / (z - t);
    	tmp = 0.0;
    	if (t_2 <= -2e+252)
    		tmp = t_1;
    	elseif (t_2 <= -5e+129)
    		tmp = y * (60.0 / t);
    	elseif (t_2 <= 1e+259)
    		tmp = a * 120.0;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(60.0 / 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+252], t$95$1, If[LessEqual[t$95$2, -5e+129], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+259], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot \frac{60}{z}\\
    t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
    \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+252}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+129}:\\
    \;\;\;\;y \cdot \frac{60}{t}\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+259}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000002e252 or 9.999999999999999e258 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

      1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \frac{\color{blue}{60}}{z} \]
        9. /-lowering-/.f6454.5

          \[\leadsto x \cdot \color{blue}{\frac{60}{z}} \]
      10. Simplified54.5%

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

      if -2.0000000000000002e252 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e129

      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      6. 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. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      9. 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--.f6447.6

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \frac{\color{blue}{60}}{t} \]
        8. /-lowering-/.f6434.5

          \[\leadsto y \cdot \color{blue}{\frac{60}{t}} \]
      13. Simplified34.5%

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

      if -5.0000000000000003e129 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.999999999999999e258

      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-*.f6455.5

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

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

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

    Alternative 5: 73.5% accurate, 0.4× speedup?

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

      1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      6. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

      if -5e-52 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000002e75

      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-*.f6476.8

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

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

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

    Alternative 6: 54.3% accurate, 0.4× speedup?

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

      1. Initial program 92.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}} \]
      4. Step-by-step derivation
        1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \frac{\color{blue}{60}}{z} \]
        9. /-lowering-/.f6460.2

          \[\leadsto x \cdot \color{blue}{\frac{60}{z}} \]
      10. Simplified60.2%

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

      if -1.0000000000000001e276 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.999999999999999e258

      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-*.f6450.5

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

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

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

    Alternative 7: 59.4% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-167}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= (* a 120.0) -1e-54)
       (* a 120.0)
       (if (<= (* a 120.0) -4e-167)
         (/ (* y -60.0) (- z t))
         (if (<= (* a 120.0) 2e-52) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((a * 120.0) <= -1e-54) {
    		tmp = a * 120.0;
    	} else if ((a * 120.0) <= -4e-167) {
    		tmp = (y * -60.0) / (z - t);
    	} else if ((a * 120.0) <= 2e-52) {
    		tmp = -60.0 * ((x - y) / t);
    	} else {
    		tmp = a * 120.0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if ((a * 120.0d0) <= (-1d-54)) then
            tmp = a * 120.0d0
        else if ((a * 120.0d0) <= (-4d-167)) then
            tmp = (y * (-60.0d0)) / (z - t)
        else if ((a * 120.0d0) <= 2d-52) then
            tmp = (-60.0d0) * ((x - y) / t)
        else
            tmp = a * 120.0d0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((a * 120.0) <= -1e-54) {
    		tmp = a * 120.0;
    	} else if ((a * 120.0) <= -4e-167) {
    		tmp = (y * -60.0) / (z - t);
    	} else if ((a * 120.0) <= 2e-52) {
    		tmp = -60.0 * ((x - y) / t);
    	} else {
    		tmp = a * 120.0;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if (a * 120.0) <= -1e-54:
    		tmp = a * 120.0
    	elif (a * 120.0) <= -4e-167:
    		tmp = (y * -60.0) / (z - t)
    	elif (a * 120.0) <= 2e-52:
    		tmp = -60.0 * ((x - y) / t)
    	else:
    		tmp = a * 120.0
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (Float64(a * 120.0) <= -1e-54)
    		tmp = Float64(a * 120.0);
    	elseif (Float64(a * 120.0) <= -4e-167)
    		tmp = Float64(Float64(y * -60.0) / Float64(z - t));
    	elseif (Float64(a * 120.0) <= 2e-52)
    		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
    	else
    		tmp = Float64(a * 120.0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if ((a * 120.0) <= -1e-54)
    		tmp = a * 120.0;
    	elseif ((a * 120.0) <= -4e-167)
    		tmp = (y * -60.0) / (z - t);
    	elseif ((a * 120.0) <= 2e-52)
    		tmp = -60.0 * ((x - y) / t);
    	else
    		tmp = a * 120.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-54], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-167], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-52], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-167}:\\
    \;\;\;\;\frac{y \cdot -60}{z - t}\\
    
    \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52}:\\
    \;\;\;\;-60 \cdot \frac{x - y}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;a \cdot 120\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 a #s(literal 120 binary64)) < -1e-54 or 2e-52 < (*.f64 a #s(literal 120 binary64))

      1. Initial program 99.8%

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

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

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

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

      if -1e-54 < (*.f64 a #s(literal 120 binary64)) < -4.00000000000000001e-167

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-60 \cdot y}}{z - t} \]
        4. --lowering--.f6462.5

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

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

      if -4.00000000000000001e-167 < (*.f64 a #s(literal 120 binary64)) < 2e-52

      1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      6. 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. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      9. 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--.f6455.7

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

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

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

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

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

          \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
        5. --lowering--.f6455.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-167}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 59.4% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-167}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= (* a 120.0) -1e-54)
       (* a 120.0)
       (if (<= (* a 120.0) -4e-167)
         (* -60.0 (/ y (- z t)))
         (if (<= (* a 120.0) 2e-52) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((a * 120.0) <= -1e-54) {
    		tmp = a * 120.0;
    	} else if ((a * 120.0) <= -4e-167) {
    		tmp = -60.0 * (y / (z - t));
    	} else if ((a * 120.0) <= 2e-52) {
    		tmp = -60.0 * ((x - y) / t);
    	} else {
    		tmp = a * 120.0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if ((a * 120.0d0) <= (-1d-54)) then
            tmp = a * 120.0d0
        else if ((a * 120.0d0) <= (-4d-167)) then
            tmp = (-60.0d0) * (y / (z - t))
        else if ((a * 120.0d0) <= 2d-52) then
            tmp = (-60.0d0) * ((x - y) / t)
        else
            tmp = a * 120.0d0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((a * 120.0) <= -1e-54) {
    		tmp = a * 120.0;
    	} else if ((a * 120.0) <= -4e-167) {
    		tmp = -60.0 * (y / (z - t));
    	} else if ((a * 120.0) <= 2e-52) {
    		tmp = -60.0 * ((x - y) / t);
    	} else {
    		tmp = a * 120.0;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if (a * 120.0) <= -1e-54:
    		tmp = a * 120.0
    	elif (a * 120.0) <= -4e-167:
    		tmp = -60.0 * (y / (z - t))
    	elif (a * 120.0) <= 2e-52:
    		tmp = -60.0 * ((x - y) / t)
    	else:
    		tmp = a * 120.0
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (Float64(a * 120.0) <= -1e-54)
    		tmp = Float64(a * 120.0);
    	elseif (Float64(a * 120.0) <= -4e-167)
    		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
    	elseif (Float64(a * 120.0) <= 2e-52)
    		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
    	else
    		tmp = Float64(a * 120.0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if ((a * 120.0) <= -1e-54)
    		tmp = a * 120.0;
    	elseif ((a * 120.0) <= -4e-167)
    		tmp = -60.0 * (y / (z - t));
    	elseif ((a * 120.0) <= 2e-52)
    		tmp = -60.0 * ((x - y) / t);
    	else
    		tmp = a * 120.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-54], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-167], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-52], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-167}:\\
    \;\;\;\;-60 \cdot \frac{y}{z - t}\\
    
    \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52}:\\
    \;\;\;\;-60 \cdot \frac{x - y}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;a \cdot 120\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 a #s(literal 120 binary64)) < -1e-54 or 2e-52 < (*.f64 a #s(literal 120 binary64))

      1. Initial program 99.8%

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

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

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

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

      if -1e-54 < (*.f64 a #s(literal 120 binary64)) < -4.00000000000000001e-167

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
      4. Step-by-step derivation
        1. *-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--.f6462.3

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

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

      if -4.00000000000000001e-167 < (*.f64 a #s(literal 120 binary64)) < 2e-52

      1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      6. 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. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      9. 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--.f6455.7

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

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

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

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

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

          \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
        5. --lowering--.f6455.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-167}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 58.0% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+22}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= (* a 120.0) -1e-54)
       (* a 120.0)
       (if (<= (* a 120.0) 4e+22) (* -60.0 (/ y (- z t))) (* a 120.0))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((a * 120.0) <= -1e-54) {
    		tmp = a * 120.0;
    	} else if ((a * 120.0) <= 4e+22) {
    		tmp = -60.0 * (y / (z - t));
    	} else {
    		tmp = a * 120.0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if ((a * 120.0d0) <= (-1d-54)) then
            tmp = a * 120.0d0
        else if ((a * 120.0d0) <= 4d+22) then
            tmp = (-60.0d0) * (y / (z - t))
        else
            tmp = a * 120.0d0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if ((a * 120.0) <= -1e-54) {
    		tmp = a * 120.0;
    	} else if ((a * 120.0) <= 4e+22) {
    		tmp = -60.0 * (y / (z - t));
    	} else {
    		tmp = a * 120.0;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if (a * 120.0) <= -1e-54:
    		tmp = a * 120.0
    	elif (a * 120.0) <= 4e+22:
    		tmp = -60.0 * (y / (z - t))
    	else:
    		tmp = a * 120.0
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (Float64(a * 120.0) <= -1e-54)
    		tmp = Float64(a * 120.0);
    	elseif (Float64(a * 120.0) <= 4e+22)
    		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
    	else
    		tmp = Float64(a * 120.0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if ((a * 120.0) <= -1e-54)
    		tmp = a * 120.0;
    	elseif ((a * 120.0) <= 4e+22)
    		tmp = -60.0 * (y / (z - t));
    	else
    		tmp = a * 120.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-54], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e+22], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+22}:\\
    \;\;\;\;-60 \cdot \frac{y}{z - t}\\
    
    \mathbf{else}:\\
    \;\;\;\;a \cdot 120\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 a #s(literal 120 binary64)) < -1e-54 or 4e22 < (*.f64 a #s(literal 120 binary64))

      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-*.f6473.2

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

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

      if -1e-54 < (*.f64 a #s(literal 120 binary64)) < 4e22

      1. Initial program 98.2%

        \[\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--.f6447.0

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-54}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+22}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 88.4% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot x\right)\\ \mathbf{if}\;x \leq -3.3 \cdot 10^{+113}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(a, 120, \frac{y \cdot -60}{z - t}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma a 120.0 (* (/ 60.0 (- z t)) x))))
       (if (<= x -3.3e+113)
         t_1
         (if (<= x 2e-40) (fma a 120.0 (/ (* y -60.0) (- z t))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma(a, 120.0, ((60.0 / (z - t)) * x));
    	double tmp;
    	if (x <= -3.3e+113) {
    		tmp = t_1;
    	} else if (x <= 2e-40) {
    		tmp = fma(a, 120.0, ((y * -60.0) / (z - t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * x))
    	tmp = 0.0
    	if (x <= -3.3e+113)
    		tmp = t_1;
    	elseif (x <= 2e-40)
    		tmp = fma(a, 120.0, Float64(Float64(y * -60.0) / Float64(z - t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.3e+113], t$95$1, If[LessEqual[x, 2e-40], N[(a * 120.0 + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot x\right)\\
    \mathbf{if}\;x \leq -3.3 \cdot 10^{+113}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 2 \cdot 10^{-40}:\\
    \;\;\;\;\mathsf{fma}\left(a, 120, \frac{y \cdot -60}{z - t}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -3.3000000000000003e113 or 1.9999999999999999e-40 < x

      1. Initial program 98.0%

        \[\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--.f6485.5

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} + a \cdot 120 \]
      6. Step-by-step derivation
        1. +-commutativeN/A

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

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

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

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

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

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

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

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

      if -3.3000000000000003e113 < x < 1.9999999999999999e-40

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a, 120, \frac{x - y}{\color{blue}{\left(z - t\right)} \cdot \frac{1}{60}}\right) \]
        11. metadata-eval99.8

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 83.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\ \mathbf{if}\;t \leq -7 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, 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) t) (* a 120.0))))
       (if (<= t -7e-7)
         t_1
         (if (<= t 1.95e+37) (fma 60.0 (/ (- x y) z) (* 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) / t), (a * 120.0));
    	double tmp;
    	if (t <= -7e-7) {
    		tmp = t_1;
    	} else if (t <= 1.95e+37) {
    		tmp = fma(60.0, ((x - y) / z), (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) / t), Float64(a * 120.0))
    	tmp = 0.0
    	if (t <= -7e-7)
    		tmp = t_1;
    	elseif (t <= 1.95e+37)
    		tmp = fma(60.0, Float64(Float64(x - y) / z), 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] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-7], t$95$1, If[LessEqual[t, 1.95e+37], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $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}{t}, a \cdot 120\right)\\
    \mathbf{if}\;t \leq -7 \cdot 10^{-7}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 1.95 \cdot 10^{+37}:\\
    \;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -6.99999999999999968e-7 or 1.9499999999999999e37 < t

      1. Initial program 99.0%

        \[\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-*.f6486.6

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

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

      if -6.99999999999999968e-7 < t < 1.9499999999999999e37

      1. Initial program 99.0%

        \[\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-*.f6485.4

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

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

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

    Alternative 12: 53.0% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{-60}{t}\\ \mathbf{if}\;x \leq -5.8 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{+253}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* x (/ -60.0 t))))
       (if (<= x -5.8e+204) t_1 (if (<= x 2.15e+253) (* a 120.0) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x * (-60.0 / t);
    	double tmp;
    	if (x <= -5.8e+204) {
    		tmp = t_1;
    	} else if (x <= 2.15e+253) {
    		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 = x * ((-60.0d0) / t)
        if (x <= (-5.8d+204)) then
            tmp = t_1
        else if (x <= 2.15d+253) 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 * (-60.0 / t);
    	double tmp;
    	if (x <= -5.8e+204) {
    		tmp = t_1;
    	} else if (x <= 2.15e+253) {
    		tmp = a * 120.0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = x * (-60.0 / t)
    	tmp = 0
    	if x <= -5.8e+204:
    		tmp = t_1
    	elif x <= 2.15e+253:
    		tmp = a * 120.0
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x * Float64(-60.0 / t))
    	tmp = 0.0
    	if (x <= -5.8e+204)
    		tmp = t_1;
    	elseif (x <= 2.15e+253)
    		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 * (-60.0 / t);
    	tmp = 0.0;
    	if (x <= -5.8e+204)
    		tmp = t_1;
    	elseif (x <= 2.15e+253)
    		tmp = a * 120.0;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.8e+204], t$95$1, If[LessEqual[x, 2.15e+253], N[(a * 120.0), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot \frac{-60}{t}\\
    \mathbf{if}\;x \leq -5.8 \cdot 10^{+204}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 2.15 \cdot 10^{+253}:\\
    \;\;\;\;a \cdot 120\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -5.80000000000000007e204 or 2.1499999999999999e253 < x

      1. Initial program 96.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}} \]
      4. Step-by-step derivation
        1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{x \cdot \frac{-60}{t}} \]
        5. /-lowering-/.f6452.4

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

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

      if -5.80000000000000007e204 < x < 2.1499999999999999e253

      1. Initial program 99.3%

        \[\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-*.f6449.4

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

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

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

    Alternative 13: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{x - y}{\color{blue}{\left(z - t\right)} \cdot \frac{1}{60}}\right) \]
      11. metadata-eval99.8

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

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

    Alternative 14: 99.5% 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.0%

      \[\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.0

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

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

    Alternative 15: 51.0% 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.0%

      \[\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-*.f6445.4

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    6. Final simplification45.4%

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