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

Percentage Accurate: 99.4% → 99.8%
Time: 14.8s
Alternatives: 14
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 14 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, 0.1× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 53.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z - t \leq -20000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z - t \leq 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z - t \leq 2 \cdot 10^{+58}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

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

    if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70 or -2e7 < (-.f64 z t) < 1.00000000000000007e-17 or 1.99999999999999989e58 < (-.f64 z t) < 5.00000000000000015e82

    1. Initial program 98.7%

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

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

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

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

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

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

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.7%

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

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

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

    if -5.0000000000000002e70 < (-.f64 z t) < -2e7 or 1.00000000000000007e-17 < (-.f64 z t) < 1.99999999999999989e58

    1. Initial program 95.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      2. *-un-lft-identity95.4%

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

        \[\leadsto \color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      4. metadata-eval99.9%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;z - t \leq -20000000:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;z - t \leq 10^{-17}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;z - t \leq 2 \cdot 10^{+58}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 53.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z - t \leq 10^{-90}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

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

    if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70 or -2e7 < (-.f64 z t) < 9.99999999999999995e-91

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.7%

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

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

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

    if -5.0000000000000002e70 < (-.f64 z t) < -2e7

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      2. *-un-lft-identity89.6%

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.7%

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

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

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

    if 9.99999999999999995e-91 < (-.f64 z t) < 5.00000000000000015e82

    1. Initial program 97.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;z - t \leq -20000000:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;z - t \leq 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 53.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

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

    if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      4. metadata-eval99.7%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.8%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - t}{60}}} \]
    11. Simplified71.0%

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
      3. associate-/r/59.0%

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
      4. metadata-eval59.0%

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

        \[\leadsto \color{blue}{\left(-\frac{60}{z - t}\right)} \cdot y \]
      6. distribute-lft-neg-in59.0%

        \[\leadsto \color{blue}{-\frac{60}{z - t} \cdot y} \]
      7. *-commutative59.0%

        \[\leadsto -\color{blue}{y \cdot \frac{60}{z - t}} \]
      8. distribute-rgt-neg-in59.0%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{60}{z - t}\right)} \]
      9. distribute-neg-frac59.0%

        \[\leadsto y \cdot \color{blue}{\frac{-60}{z - t}} \]
      10. metadata-eval59.0%

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

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

    if -5.0000000000000002e70 < (-.f64 z t) < -2e7

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      2. *-un-lft-identity89.6%

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.7%

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

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

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

    if -2e7 < (-.f64 z t) < 9.99999999999999995e-91

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.6%

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

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

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

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

    if 9.99999999999999995e-91 < (-.f64 z t) < 5.00000000000000015e82

    1. Initial program 97.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\ \;\;\;\;y \cdot \frac{-60}{z - t}\\ \mathbf{elif}\;z - t \leq -20000000:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;z - t \leq 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 53.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

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

    if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      4. metadata-eval99.7%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.8%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.8%

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

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

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

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

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

    if -5.0000000000000002e70 < (-.f64 z t) < -2e7

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      2. *-un-lft-identity89.6%

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.7%

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

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

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

    if -2e7 < (-.f64 z t) < 9.99999999999999995e-91

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.6%

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

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

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

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

    if 9.99999999999999995e-91 < (-.f64 z t) < 5.00000000000000015e82

    1. Initial program 97.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;z - t \leq -20000000:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;z - t \leq 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z}{x - y}} + a \cdot 120\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-127}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.42 \cdot 10^{+80}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.19999999999999982e-127 or 1.4200000000000001e80 < z

    1. Initial program 99.2%

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

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

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

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

    if -5.19999999999999982e-127 < z < 4.99999999999999981e-165

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. associate-/l*95.1%

        \[\leadsto \color{blue}{\frac{-60}{\frac{t}{x - y}}} + a \cdot 120 \]
      2. associate-/r/95.1%

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

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

    if 4.99999999999999981e-165 < z < 1.4200000000000001e80

    1. Initial program 97.6%

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

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

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

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

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

Alternative 7: 76.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127} \lor \neg \left(z - t \leq 5 \cdot 10^{+82}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -1.99999999999999991e127 < (-.f64 z t) < 5.00000000000000015e82

    1. Initial program 98.0%

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

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

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

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

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

Alternative 8: 74.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+48} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{+57}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -4.99999999999999973e48 or 4.00000000000000019e57 < (*.f64 a 120)

    1. Initial program 99.0%

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

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

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

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

    if -4.99999999999999973e48 < (*.f64 a 120) < 4.00000000000000019e57

    1. Initial program 99.0%

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

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

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

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

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

Alternative 9: 89.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+50} \lor \neg \left(y \leq 3.8 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5000000000000003e50 or 3.8000000000000002e-14 < y

    1. Initial program 98.9%

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

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

    if -6.5000000000000003e50 < y < 3.8000000000000002e-14

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

Alternative 10: 52.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 5.5 \cdot 10^{-261}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.00000000000000018e-223 or 2.8000000000000001e-121 < a

    1. Initial program 99.3%

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

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

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

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

    if -7.00000000000000018e-223 < a < 5.50000000000000042e-261

    1. Initial program 99.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      2. *-un-lft-identity99.4%

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.6%

        \[\leadsto \color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      4. metadata-eval99.6%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.5%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.5%

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

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

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

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

    if 5.50000000000000042e-261 < a < 2.8000000000000001e-121

    1. Initial program 96.3%

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Taylor expanded in x around inf 43.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-223}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-261}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-121}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 57.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{-92} \lor \neg \left(a \leq 10^{+21}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.3999999999999999e-92 or 1e21 < a

    1. Initial program 99.2%

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

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

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

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

    if -5.3999999999999999e-92 < a < 1e21

    1. Initial program 98.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      4. metadata-eval99.7%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.6%

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

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

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

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

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

Alternative 12: 52.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-223} \lor \neg \left(a \leq 1.5 \cdot 10^{-143}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.00000000000000018e-223 or 1.49999999999999993e-143 < a

    1. Initial program 99.3%

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

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

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

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

    if -7.00000000000000018e-223 < a < 1.49999999999999993e-143

    1. Initial program 98.0%

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

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

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

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

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

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

        \[\leadsto \frac{60 \cdot \left(x - y\right)}{\color{blue}{1 \cdot \left(z - t\right)}} + a \cdot 120 \]
      3. times-frac99.6%

        \[\leadsto \color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      4. metadata-eval99.6%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.5%

        \[\leadsto \frac{\color{blue}{x - y}}{0.016666666666666666 \cdot \left(z - t\right)} + a \cdot 120 \]
      8. *-commutative99.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-223} \lor \neg \left(a \leq 1.5 \cdot 10^{-143}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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