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

Percentage Accurate: 99.4% → 99.8%
Time: 13.1s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 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.0× speedup?

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

\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.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 \mathsf{+.f64}\left(\left(\frac{\left(x - y\right) \cdot 60}{z - t}\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
    2. associate-/l*N/A

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

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \left(z - t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
    6. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
    7. --lowering--.f6499.8%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
  4. Applied egg-rr99.8%

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

Alternative 2: 82.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
t_2 := t\_1 \cdot x + a \cdot 120\\
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-38}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-122}:\\
\;\;\;\;t\_1 \cdot \left(x - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -3.9999999999999998e-38 or 2.00000000000000012e-122 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \left(z - t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
      7. --lowering--.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
    4. Applied egg-rr99.8%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \color{blue}{x}\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
    6. Step-by-step derivation
      1. Simplified88.4%

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

      if -3.9999999999999998e-38 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000012e-122

      1. Initial program 99.6%

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \left(z - t\right)\right) \]
        5. --lowering--.f6486.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
      5. Simplified86.0%

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \left(x - y\right)\right) \]
        5. --lowering--.f6486.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(x, \color{blue}{y}\right)\right) \]
      7. Applied egg-rr86.1%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} \]
    7. Recombined 2 regimes into one program.
    8. Add Preprocessing

    Alternative 3: 75.2% accurate, 0.6× speedup?

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

          \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
      5. Simplified79.1%

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

      if -1e14 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999995e-8

      1. Initial program 99.6%

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \left(z - t\right)\right) \]
        5. --lowering--.f6479.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
      5. Simplified79.6%

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\color{blue}{x} - y\right)\right)\right) \]
        7. --lowering--.f6479.7%

          \[\leadsto \mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
      7. Applied egg-rr79.7%

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

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

    Alternative 4: 75.1% accurate, 0.6× speedup?

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

          \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
      5. Simplified78.7%

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

      if -1e14 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000004e-25

      1. Initial program 99.6%

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \left(z - t\right)\right) \]
        5. --lowering--.f6480.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
      5. Simplified80.0%

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \left(x - y\right)\right) \]
        5. --lowering--.f6480.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(x, \color{blue}{y}\right)\right) \]
      7. Applied egg-rr80.1%

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

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

    Alternative 5: 89.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60}{\frac{t - z}{y}} + a \cdot 120\\ \mathbf{if}\;y \leq -6 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+82}:\\ \;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (+ (/ 60.0 (/ (- t z) y)) (* a 120.0))))
       (if (<= y -6e+72)
         t_1
         (if (<= y 2.65e+82) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (60.0 / ((t - z) / y)) + (a * 120.0);
    	double tmp;
    	if (y <= -6e+72) {
    		tmp = t_1;
    	} else if (y <= 2.65e+82) {
    		tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (60.0d0 / ((t - z) / y)) + (a * 120.0d0)
        if (y <= (-6d+72)) then
            tmp = t_1
        else if (y <= 2.65d+82) then
            tmp = ((60.0d0 / (z - t)) * x) + (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 / ((t - z) / y)) + (a * 120.0);
    	double tmp;
    	if (y <= -6e+72) {
    		tmp = t_1;
    	} else if (y <= 2.65e+82) {
    		tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (60.0 / ((t - z) / y)) + (a * 120.0)
    	tmp = 0
    	if y <= -6e+72:
    		tmp = t_1
    	elif y <= 2.65e+82:
    		tmp = ((60.0 / (z - t)) * x) + (a * 120.0)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(60.0 / Float64(Float64(t - z) / y)) + Float64(a * 120.0))
    	tmp = 0.0
    	if (y <= -6e+72)
    		tmp = t_1;
    	elseif (y <= 2.65e+82)
    		tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + 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 / ((t - z) / y)) + (a * 120.0);
    	tmp = 0.0;
    	if (y <= -6e+72)
    		tmp = t_1;
    	elseif (y <= 2.65e+82)
    		tmp = ((60.0 / (z - t)) * x) + (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[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+72], t$95$1, If[LessEqual[y, 2.65e+82], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{60}{\frac{t - z}{y}} + a \cdot 120\\
    \mathbf{if}\;y \leq -6 \cdot 10^{+72}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 2.65 \cdot 10^{+82}:\\
    \;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -6.00000000000000006e72 or 2.64999999999999989e82 < y

      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. associate-/l*N/A

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

          \[\leadsto \mathsf{+.f64}\left(\left(60 \cdot \frac{1}{\frac{z - t}{x - y}}\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        3. un-div-invN/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(z - t\right), \left(x - y\right)\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(x - y\right)\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        7. --lowering--.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(x, y\right)\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
      4. Applied egg-rr99.8%

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \left(\frac{-1 \cdot \left(z - t\right)}{y}\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(-1 \cdot \left(z - t\right)\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(z - t\right)\right)\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(z + \left(\mathsf{neg}\left(t\right)\right)\right)\right)\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + z\right)\right)\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        6. distribute-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(z\right)\right)\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        7. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) - z\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        8. remove-double-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\left(t - z\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        9. --lowering--.f6492.4%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(60, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
      7. Simplified92.4%

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

      if -6.00000000000000006e72 < y < 2.64999999999999989e82

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \left(z - t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        7. --lowering--.f6499.8%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
      4. Applied egg-rr99.8%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \color{blue}{x}\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
      6. Step-by-step derivation
        1. Simplified91.9%

          \[\leadsto \frac{60}{z - t} \cdot \color{blue}{x} + a \cdot 120 \]
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 6: 59.1% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{-48}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= a -1.35e-48)
         (* a 120.0)
         (if (<= a 5.5e-26) (/ (* (- x y) -60.0) t) (* a 120.0))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (a <= -1.35e-48) {
      		tmp = a * 120.0;
      	} else if (a <= 5.5e-26) {
      		tmp = ((x - y) * -60.0) / 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 <= (-1.35d-48)) then
              tmp = a * 120.0d0
          else if (a <= 5.5d-26) then
              tmp = ((x - y) * (-60.0d0)) / 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 <= -1.35e-48) {
      		tmp = a * 120.0;
      	} else if (a <= 5.5e-26) {
      		tmp = ((x - y) * -60.0) / t;
      	} else {
      		tmp = a * 120.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if a <= -1.35e-48:
      		tmp = a * 120.0
      	elif a <= 5.5e-26:
      		tmp = ((x - y) * -60.0) / t
      	else:
      		tmp = a * 120.0
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (a <= -1.35e-48)
      		tmp = Float64(a * 120.0);
      	elseif (a <= 5.5e-26)
      		tmp = Float64(Float64(Float64(x - y) * -60.0) / 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 <= -1.35e-48)
      		tmp = a * 120.0;
      	elseif (a <= 5.5e-26)
      		tmp = ((x - y) * -60.0) / t;
      	else
      		tmp = a * 120.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.35e-48], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.5e-26], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -1.35 \cdot 10^{-48}:\\
      \;\;\;\;a \cdot 120\\
      
      \mathbf{elif}\;a \leq 5.5 \cdot 10^{-26}:\\
      \;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot 120\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -1.35000000000000006e-48 or 5.5000000000000005e-26 < a

        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-*.f6476.0%

            \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
        5. Simplified76.0%

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

        if -1.35000000000000006e-48 < a < 5.5000000000000005e-26

        1. Initial program 99.6%

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \left(z - t\right)\right) \]
          5. --lowering--.f6483.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(60, \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
        5. Simplified83.7%

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-60, \left(x - y\right)\right), t\right) \]
          4. --lowering--.f6451.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-60, \mathsf{\_.f64}\left(x, y\right)\right), t\right) \]
        8. Simplified51.2%

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

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

      Alternative 7: 59.5% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.26 \cdot 10^{-51}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-43}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot -0.016666666666666666}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= a -1.26e-51)
         (* a 120.0)
         (if (<= a 3.1e-43) (/ x (* (- t z) -0.016666666666666666)) (* a 120.0))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (a <= -1.26e-51) {
      		tmp = a * 120.0;
      	} else if (a <= 3.1e-43) {
      		tmp = x / ((t - z) * -0.016666666666666666);
      	} 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 <= (-1.26d-51)) then
              tmp = a * 120.0d0
          else if (a <= 3.1d-43) then
              tmp = x / ((t - z) * (-0.016666666666666666d0))
          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 <= -1.26e-51) {
      		tmp = a * 120.0;
      	} else if (a <= 3.1e-43) {
      		tmp = x / ((t - z) * -0.016666666666666666);
      	} else {
      		tmp = a * 120.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if a <= -1.26e-51:
      		tmp = a * 120.0
      	elif a <= 3.1e-43:
      		tmp = x / ((t - z) * -0.016666666666666666)
      	else:
      		tmp = a * 120.0
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (a <= -1.26e-51)
      		tmp = Float64(a * 120.0);
      	elseif (a <= 3.1e-43)
      		tmp = Float64(x / Float64(Float64(t - z) * -0.016666666666666666));
      	else
      		tmp = Float64(a * 120.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (a <= -1.26e-51)
      		tmp = a * 120.0;
      	elseif (a <= 3.1e-43)
      		tmp = x / ((t - z) * -0.016666666666666666);
      	else
      		tmp = a * 120.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.26e-51], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.1e-43], N[(x / N[(N[(t - z), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -1.26 \cdot 10^{-51}:\\
      \;\;\;\;a \cdot 120\\
      
      \mathbf{elif}\;a \leq 3.1 \cdot 10^{-43}:\\
      \;\;\;\;\frac{x}{\left(t - z\right) \cdot -0.016666666666666666}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot 120\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -1.2600000000000001e-51 or 3.0999999999999999e-43 < a

        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-*.f6474.4%

            \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
        5. Simplified74.4%

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

        if -1.2600000000000001e-51 < a < 3.0999999999999999e-43

        1. Initial program 99.6%

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\frac{60 \cdot \left(x - y\right)}{z - t}\right)}^{3} + {\left(a \cdot 120\right)}^{3}}{\frac{60 \cdot \left(x - y\right)}{z - t} \cdot \frac{60 \cdot \left(x - y\right)}{z - t} + \left(\left(a \cdot 120\right) \cdot \left(a \cdot 120\right) - \frac{60 \cdot \left(x - y\right)}{z - t} \cdot \left(a \cdot 120\right)\right)}}}\right)\right) \]
          5. flip3-+N/A

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\left(t - z\right) \cdot \frac{-1}{60}\right), x\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(t - z\right), \frac{-1}{60}\right), x\right)\right) \]
          5. --lowering--.f6449.2%

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \frac{-1}{60}\right), x\right)\right) \]
        7. Simplified49.2%

          \[\leadsto \frac{1}{\color{blue}{\frac{\left(t - z\right) \cdot -0.016666666666666666}{x}}} \]
        8. Step-by-step derivation
          1. clear-numN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\frac{-1}{60}}\right)\right) \]
          4. --lowering--.f6449.2%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \frac{-1}{60}\right)\right) \]
        9. Applied egg-rr49.2%

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

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

      Alternative 8: 59.4% accurate, 0.8× speedup?

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

        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-*.f6474.4%

            \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
        5. Simplified74.4%

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

        if -1.3999999999999999e-50 < a < 7.1999999999999998e-43

        1. Initial program 99.6%

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \left(z - t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
          6. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \left(x - y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
          7. --lowering--.f6499.7%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), \mathsf{\_.f64}\left(x, y\right)\right), \mathsf{*.f64}\left(a, 120\right)\right) \]
        4. Applied egg-rr99.7%

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, 60\right), \left(\color{blue}{z} - t\right)\right) \]
          5. --lowering--.f6449.1%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, 60\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
        7. Simplified49.1%

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \left(z - t\right)\right), x\right) \]
          5. --lowering--.f6449.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(60, \mathsf{\_.f64}\left(z, t\right)\right), x\right) \]
        9. Applied egg-rr49.2%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-50}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-43}:\\ \;\;\;\;\frac{60}{z - t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 57.2% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{-42}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-24}:\\ \;\;\;\;-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 -4.2e-42)
         (* a 120.0)
         (if (<= a 2.9e-24) (* -60.0 (/ y (- z t))) (* a 120.0))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (a <= -4.2e-42) {
      		tmp = a * 120.0;
      	} else if (a <= 2.9e-24) {
      		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 <= (-4.2d-42)) then
              tmp = a * 120.0d0
          else if (a <= 2.9d-24) 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 <= -4.2e-42) {
      		tmp = a * 120.0;
      	} else if (a <= 2.9e-24) {
      		tmp = -60.0 * (y / (z - t));
      	} else {
      		tmp = a * 120.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if a <= -4.2e-42:
      		tmp = a * 120.0
      	elif a <= 2.9e-24:
      		tmp = -60.0 * (y / (z - t))
      	else:
      		tmp = a * 120.0
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (a <= -4.2e-42)
      		tmp = Float64(a * 120.0);
      	elseif (a <= 2.9e-24)
      		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 <= -4.2e-42)
      		tmp = a * 120.0;
      	elseif (a <= 2.9e-24)
      		tmp = -60.0 * (y / (z - t));
      	else
      		tmp = a * 120.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e-42], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.9e-24], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -4.2 \cdot 10^{-42}:\\
      \;\;\;\;a \cdot 120\\
      
      \mathbf{elif}\;a \leq 2.9 \cdot 10^{-24}:\\
      \;\;\;\;-60 \cdot \frac{y}{z - t}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot 120\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -4.20000000000000013e-42 or 2.8999999999999999e-24 < a

        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-*.f6476.4%

            \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
        5. Simplified76.4%

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

        if -4.20000000000000013e-42 < a < 2.8999999999999999e-24

        1. Initial program 99.6%

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

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

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

            \[\leadsto \mathsf{*.f64}\left(-60, \mathsf{/.f64}\left(y, \color{blue}{\left(z - t\right)}\right)\right) \]
          3. --lowering--.f6439.9%

            \[\leadsto \mathsf{*.f64}\left(-60, \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
        5. Simplified39.9%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{-42}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-24}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
      5. Add Preprocessing

      Alternative 10: 52.7% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{-169}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{t \cdot -0.016666666666666666}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= a -1.9e-169)
         (* a 120.0)
         (if (<= a 6.2e-44) (/ x (* t -0.016666666666666666)) (* a 120.0))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (a <= -1.9e-169) {
      		tmp = a * 120.0;
      	} else if (a <= 6.2e-44) {
      		tmp = x / (t * -0.016666666666666666);
      	} 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 <= (-1.9d-169)) then
              tmp = a * 120.0d0
          else if (a <= 6.2d-44) then
              tmp = x / (t * (-0.016666666666666666d0))
          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 <= -1.9e-169) {
      		tmp = a * 120.0;
      	} else if (a <= 6.2e-44) {
      		tmp = x / (t * -0.016666666666666666);
      	} else {
      		tmp = a * 120.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if a <= -1.9e-169:
      		tmp = a * 120.0
      	elif a <= 6.2e-44:
      		tmp = x / (t * -0.016666666666666666)
      	else:
      		tmp = a * 120.0
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (a <= -1.9e-169)
      		tmp = Float64(a * 120.0);
      	elseif (a <= 6.2e-44)
      		tmp = Float64(x / Float64(t * -0.016666666666666666));
      	else
      		tmp = Float64(a * 120.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (a <= -1.9e-169)
      		tmp = a * 120.0;
      	elseif (a <= 6.2e-44)
      		tmp = x / (t * -0.016666666666666666);
      	else
      		tmp = a * 120.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e-169], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 6.2e-44], N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -1.9 \cdot 10^{-169}:\\
      \;\;\;\;a \cdot 120\\
      
      \mathbf{elif}\;a \leq 6.2 \cdot 10^{-44}:\\
      \;\;\;\;\frac{x}{t \cdot -0.016666666666666666}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot 120\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -1.9e-169 or 6.19999999999999968e-44 < a

        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-*.f6469.1%

            \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
        5. Simplified69.1%

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

        if -1.9e-169 < a < 6.19999999999999968e-44

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\frac{60 \cdot \left(x - y\right)}{z - t}\right)}^{3} + {\left(a \cdot 120\right)}^{3}}{\frac{60 \cdot \left(x - y\right)}{z - t} \cdot \frac{60 \cdot \left(x - y\right)}{z - t} + \left(\left(a \cdot 120\right) \cdot \left(a \cdot 120\right) - \frac{60 \cdot \left(x - y\right)}{z - t} \cdot \left(a \cdot 120\right)\right)}}}\right)\right) \]
          5. flip3-+N/A

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\left(t - z\right) \cdot \frac{-1}{60}\right), x\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(t - z\right), \frac{-1}{60}\right), x\right)\right) \]
          5. --lowering--.f6450.9%

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \frac{-1}{60}\right), x\right)\right) \]
        7. Simplified50.9%

          \[\leadsto \frac{1}{\color{blue}{\frac{\left(t - z\right) \cdot -0.016666666666666666}{x}}} \]
        8. Step-by-step derivation
          1. clear-numN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\frac{-1}{60}}\right)\right) \]
          4. --lowering--.f6451.0%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \frac{-1}{60}\right)\right) \]
        9. Applied egg-rr51.0%

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \left(t \cdot \color{blue}{\frac{-1}{60}}\right)\right) \]
          2. *-lowering-*.f6432.3%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{\frac{-1}{60}}\right)\right) \]
        12. Simplified32.3%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{-169}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{t \cdot -0.016666666666666666}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
      5. Add Preprocessing

      Alternative 11: 52.4% accurate, 1.3× speedup?

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

        1. Initial program 99.7%

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

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

            \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
        5. Simplified55.1%

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

        if 1.01999999999999998e198 < x

        1. Initial program 99.6%

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\frac{60 \cdot \left(x - y\right)}{z - t}\right)}^{3} + {\left(a \cdot 120\right)}^{3}}{\frac{60 \cdot \left(x - y\right)}{z - t} \cdot \frac{60 \cdot \left(x - y\right)}{z - t} + \left(\left(a \cdot 120\right) \cdot \left(a \cdot 120\right) - \frac{60 \cdot \left(x - y\right)}{z - t} \cdot \left(a \cdot 120\right)\right)}}}\right)\right) \]
          5. flip3-+N/A

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\left(t - z\right) \cdot \frac{-1}{60}\right), x\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(t - z\right), \frac{-1}{60}\right), x\right)\right) \]
          5. --lowering--.f6469.4%

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \frac{-1}{60}\right), x\right)\right) \]
        7. Simplified69.4%

          \[\leadsto \frac{1}{\color{blue}{\frac{\left(t - z\right) \cdot -0.016666666666666666}{x}}} \]
        8. Step-by-step derivation
          1. clear-numN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{\frac{-1}{60}}\right)\right) \]
          4. --lowering--.f6469.4%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), \frac{-1}{60}\right)\right) \]
        9. Applied egg-rr69.4%

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{60 \cdot 1}{\color{blue}{z}}\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{60}{z}\right)\right) \]
          9. /-lowering-/.f6445.8%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(60, \color{blue}{z}\right)\right) \]
        12. Simplified45.8%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.02 \cdot 10^{+198}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 51.4% accurate, 4.3× speedup?

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

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

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

          \[\leadsto \mathsf{*.f64}\left(120, \color{blue}{a}\right) \]
      5. Simplified51.6%

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

        \[\leadsto a \cdot 120 \]
      7. Add Preprocessing

      Developer Target 1: 99.8% accurate, 1.0× speedup?

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

      Reproduce

      ?
      herbie shell --seed 2024192 
      (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)))