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

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

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 58.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -2.45 \cdot 10^{-6}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-181}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-228}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-138}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ x (- z t)))))
   (if (<= a -2.45e-6)
     (* a 120.0)
     (if (<= a -1.4e-90)
       (* -60.0 (/ y (- z t)))
       (if (<= a -5.1e-104)
         t_1
         (if (<= a -4.6e-181)
           (* 60.0 (/ (- x y) z))
           (if (<= a -1.05e-228)
             (* -60.0 (/ (- x y) t))
             (if (<= a 1.1e-138) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -2.45e-6) {
		tmp = a * 120.0;
	} else if (a <= -1.4e-90) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= -5.1e-104) {
		tmp = t_1;
	} else if (a <= -4.6e-181) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= -1.05e-228) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 1.1e-138) {
		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) :: tmp
    t_1 = 60.0d0 * (x / (z - t))
    if (a <= (-2.45d-6)) then
        tmp = a * 120.0d0
    else if (a <= (-1.4d-90)) then
        tmp = (-60.0d0) * (y / (z - t))
    else if (a <= (-5.1d-104)) then
        tmp = t_1
    else if (a <= (-4.6d-181)) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (a <= (-1.05d-228)) then
        tmp = (-60.0d0) * ((x - y) / t)
    else if (a <= 1.1d-138) 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 * (x / (z - t));
	double tmp;
	if (a <= -2.45e-6) {
		tmp = a * 120.0;
	} else if (a <= -1.4e-90) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= -5.1e-104) {
		tmp = t_1;
	} else if (a <= -4.6e-181) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= -1.05e-228) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 1.1e-138) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * (x / (z - t))
	tmp = 0
	if a <= -2.45e-6:
		tmp = a * 120.0
	elif a <= -1.4e-90:
		tmp = -60.0 * (y / (z - t))
	elif a <= -5.1e-104:
		tmp = t_1
	elif a <= -4.6e-181:
		tmp = 60.0 * ((x - y) / z)
	elif a <= -1.05e-228:
		tmp = -60.0 * ((x - y) / t)
	elif a <= 1.1e-138:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (a <= -2.45e-6)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.4e-90)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	elseif (a <= -5.1e-104)
		tmp = t_1;
	elseif (a <= -4.6e-181)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (a <= -1.05e-228)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	elseif (a <= 1.1e-138)
		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 * (x / (z - t));
	tmp = 0.0;
	if (a <= -2.45e-6)
		tmp = a * 120.0;
	elseif (a <= -1.4e-90)
		tmp = -60.0 * (y / (z - t));
	elseif (a <= -5.1e-104)
		tmp = t_1;
	elseif (a <= -4.6e-181)
		tmp = 60.0 * ((x - y) / z);
	elseif (a <= -1.05e-228)
		tmp = -60.0 * ((x - y) / t);
	elseif (a <= 1.1e-138)
		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[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.45e-6], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.4e-90], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.1e-104], t$95$1, If[LessEqual[a, -4.6e-181], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.05e-228], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-138], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -2.45 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4.6 \cdot 10^{-181}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;a \leq -1.05 \cdot 10^{-228}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.44999999999999984e-6 or 1.0999999999999999e-138 < a

    1. Initial program 99.9%

      \[\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 73.9%

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

    if -2.44999999999999984e-6 < a < -1.3999999999999999e-90

    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. Step-by-step derivation
      1. associate-/r/99.9%

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

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

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

    if -1.3999999999999999e-90 < a < -5.09999999999999992e-104 or -1.04999999999999995e-228 < a < 1.0999999999999999e-138

    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.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.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. Taylor expanded in x around inf 58.6%

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

    if -5.09999999999999992e-104 < a < -4.59999999999999982e-181

    1. Initial program 99.6%

      \[\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 a around 0 87.6%

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

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

    if -4.59999999999999982e-181 < a < -1.04999999999999995e-228

    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.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 71.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{-6}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-104}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-181}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-228}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-138}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 58.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{-6}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-123}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-182}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-228}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-139}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.85e-6)
   (* a 120.0)
   (if (<= a -1.55e-90)
     (* -60.0 (/ y (- z t)))
     (if (<= a -3.2e-123)
       (/ 60.0 (/ (- z t) x))
       (if (<= a -7.5e-182)
         (* 60.0 (/ (- x y) z))
         (if (<= a -1.12e-228)
           (* -60.0 (/ (- x y) t))
           (if (<= a 2.9e-139) (* 60.0 (/ x (- z t))) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.85e-6) {
		tmp = a * 120.0;
	} else if (a <= -1.55e-90) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= -3.2e-123) {
		tmp = 60.0 / ((z - t) / x);
	} else if (a <= -7.5e-182) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= -1.12e-228) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 2.9e-139) {
		tmp = 60.0 * (x / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.85d-6)) then
        tmp = a * 120.0d0
    else if (a <= (-1.55d-90)) then
        tmp = (-60.0d0) * (y / (z - t))
    else if (a <= (-3.2d-123)) then
        tmp = 60.0d0 / ((z - t) / x)
    else if (a <= (-7.5d-182)) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (a <= (-1.12d-228)) then
        tmp = (-60.0d0) * ((x - y) / t)
    else if (a <= 2.9d-139) then
        tmp = 60.0d0 * (x / (z - t))
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.85e-6) {
		tmp = a * 120.0;
	} else if (a <= -1.55e-90) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= -3.2e-123) {
		tmp = 60.0 / ((z - t) / x);
	} else if (a <= -7.5e-182) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= -1.12e-228) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 2.9e-139) {
		tmp = 60.0 * (x / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.85e-6:
		tmp = a * 120.0
	elif a <= -1.55e-90:
		tmp = -60.0 * (y / (z - t))
	elif a <= -3.2e-123:
		tmp = 60.0 / ((z - t) / x)
	elif a <= -7.5e-182:
		tmp = 60.0 * ((x - y) / z)
	elif a <= -1.12e-228:
		tmp = -60.0 * ((x - y) / t)
	elif a <= 2.9e-139:
		tmp = 60.0 * (x / (z - t))
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.85e-6)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.55e-90)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	elseif (a <= -3.2e-123)
		tmp = Float64(60.0 / Float64(Float64(z - t) / x));
	elseif (a <= -7.5e-182)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (a <= -1.12e-228)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	elseif (a <= 2.9e-139)
		tmp = Float64(60.0 * Float64(x / Float64(z - t)));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.85e-6)
		tmp = a * 120.0;
	elseif (a <= -1.55e-90)
		tmp = -60.0 * (y / (z - t));
	elseif (a <= -3.2e-123)
		tmp = 60.0 / ((z - t) / x);
	elseif (a <= -7.5e-182)
		tmp = 60.0 * ((x - y) / z);
	elseif (a <= -1.12e-228)
		tmp = -60.0 * ((x - y) / t);
	elseif (a <= 2.9e-139)
		tmp = 60.0 * (x / (z - t));
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.85e-6], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.55e-90], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.2e-123], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.5e-182], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.12e-228], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e-139], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-182}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;a \leq -1.12 \cdot 10^{-228}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{-139}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -1.8500000000000001e-6 or 2.8999999999999999e-139 < a

    1. Initial program 99.9%

      \[\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 73.9%

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

    if -1.8500000000000001e-6 < a < -1.5500000000000001e-90

    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. Step-by-step derivation
      1. associate-/r/99.9%

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

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

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

    if -1.5500000000000001e-90 < a < -3.19999999999999979e-123

    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. Step-by-step derivation
      1. associate-/r/99.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x}}} \]
    9. Simplified73.0%

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

    if -3.19999999999999979e-123 < a < -7.49999999999999935e-182

    1. Initial program 99.5%

      \[\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 a around 0 92.3%

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

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

    if -7.49999999999999935e-182 < a < -1.11999999999999996e-228

    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.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 71.6%

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

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

    if -1.11999999999999996e-228 < a < 2.8999999999999999e-139

    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.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.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. Taylor expanded in x around inf 57.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{-6}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-90}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-123}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-182}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq -1.12 \cdot 10^{-228}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-139}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000000:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+130}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2e9

    1. Initial program 99.9%

      \[\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 87.2%

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

    if -2e9 < (*.f64 a 120) < 5.0000000000000002e-28

    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.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.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. Taylor expanded in a around 0 76.0%

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

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

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

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

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

    if 5.0000000000000002e-28 < (*.f64 a 120) < 4.0000000000000002e130

    1. Initial program 99.9%

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

      \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
    4. Step-by-step derivation
      1. *-commutative83.2%

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

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

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

    if 4.0000000000000002e130 < (*.f64 a 120)

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. *-commutative87.5%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{60}}} + a \cdot 120 \]
    8. Simplified87.5%

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

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

Alternative 5: 74.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \lor \neg \left(a \leq 5.2 \cdot 10^{-31}\right) \land \left(a \leq 1.85 \cdot 10^{+27} \lor \neg \left(a \leq 2.4 \cdot 10^{+72}\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.69999999999999996 or 5.19999999999999991e-31 < a < 1.85000000000000001e27 or 2.4000000000000001e72 < a

    1. Initial program 99.9%

      \[\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 84.6%

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

    if -1.69999999999999996 < a < 5.19999999999999991e-31 or 1.85000000000000001e27 < a < 2.4000000000000001e72

    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.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 76.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \lor \neg \left(a \leq 5.2 \cdot 10^{-31}\right) \land \left(a \leq 1.85 \cdot 10^{+27} \lor \neg \left(a \leq 2.4 \cdot 10^{+72}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -2e9 or 5.00000000000000027e-129 < (*.f64 a 120)

    1. Initial program 99.9%

      \[\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 x around inf 89.0%

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

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

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

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

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

    if -2e9 < (*.f64 a 120) < 5.00000000000000027e-129

    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.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 80.9%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. *-commutative80.9%

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

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

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

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

Alternative 7: 75.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000000 \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-31}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -2e9 or 2e-31 < (*.f64 a 120)

    1. Initial program 99.9%

      \[\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 79.8%

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

    if -2e9 < (*.f64 a 120) < 2e-31

    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.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.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. Taylor expanded in a around 0 76.6%

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

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

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

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

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

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

Alternative 8: 58.2% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-67}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.25000000000000006e-5 or 1.9499999999999999e-67 < a

    1. Initial program 99.9%

      \[\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 77.6%

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

    if -1.25000000000000006e-5 < a < -2.90000000000000006e-176

    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.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. Taylor expanded in y around inf 42.6%

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

    if -2.90000000000000006e-176 < a < 1.9499999999999999e-67

    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.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 79.3%

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

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

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

Alternative 9: 57.8% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-148}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8500000000000001e-6 or 2.60000000000000008e-148 < a

    1. Initial program 99.9%

      \[\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 73.9%

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

    if -1.8500000000000001e-6 < a < -1.7499999999999999e-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.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.9%

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

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

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

    if -1.7499999999999999e-91 < a < 2.60000000000000008e-148

    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.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.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. Taylor expanded in x around inf 56.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{-6}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-91}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-148}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 80.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-150} \lor \neg \left(t \leq 1.9 \cdot 10^{-79}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6000000000000002e-150 or 1.9000000000000001e-79 < t

    1. Initial program 99.9%

      \[\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 83.6%

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

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

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

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

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

    if -3.6000000000000002e-150 < t < 1.9000000000000001e-79

    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.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 93.2%

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

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

Alternative 11: 88.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4e8 or 2.09999999999999991e-36 < x

    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.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 x around inf 88.7%

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

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

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

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

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

    if -4e8 < x < 2.09999999999999991e-36

    1. Initial program 99.9%

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

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

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

Alternative 12: 88.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -270000:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\

\mathbf{elif}\;x \leq 4 \cdot 10^{-36}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.7e5

    1. Initial program 99.8%

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

      \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
    4. Step-by-step derivation
      1. *-commutative91.0%

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

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

    if -2.7e5 < x < 3.9999999999999998e-36

    1. Initial program 99.9%

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

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

    if 3.9999999999999998e-36 < x

    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.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 x around inf 86.8%

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

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

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

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

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

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

Alternative 13: 88.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3100:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\

\mathbf{elif}\;x \leq 2.25 \cdot 10^{-38}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3100

    1. Initial program 99.8%

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

      \[\leadsto \frac{\color{blue}{60 \cdot x}}{z - t} + a \cdot 120 \]
    4. Step-by-step derivation
      1. *-commutative91.0%

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

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

    if -3100 < x < 2.25000000000000004e-38

    1. Initial program 99.9%

      \[\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 x around 0 95.2%

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

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

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

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

    if 2.25000000000000004e-38 < x

    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.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 x around inf 86.8%

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

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

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

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

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

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

Alternative 14: 57.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.45 \cdot 10^{-6} \lor \neg \left(a \leq 2.35 \cdot 10^{-155}\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 -2.45e-6) (not (<= a 2.35e-155)))
   (* a 120.0)
   (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -2.45e-6) || !(a <= 2.35e-155)) {
		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 <= (-2.45d-6)) .or. (.not. (a <= 2.35d-155))) 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 <= -2.45e-6) || !(a <= 2.35e-155)) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (y / (z - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -2.45e-6) or not (a <= 2.35e-155):
		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 <= -2.45e-6) || !(a <= 2.35e-155))
		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 <= -2.45e-6) || ~((a <= 2.35e-155)))
		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, -2.45e-6], N[Not[LessEqual[a, 2.35e-155]], $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 -2.45 \cdot 10^{-6} \lor \neg \left(a \leq 2.35 \cdot 10^{-155}\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 < -2.44999999999999984e-6 or 2.3499999999999999e-155 < a

    1. Initial program 99.9%

      \[\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 73.4%

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

    if -2.44999999999999984e-6 < a < 2.3499999999999999e-155

    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.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.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. Taylor expanded in y around inf 35.7%

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

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

Alternative 15: 99.8% accurate, 1.0× speedup?

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

\\
a \cdot 120 + \frac{60}{z - t} \cdot \left(x - y\right)
\end{array}
Derivation
  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. 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 a \cdot 120 + \frac{60}{z - t} \cdot \left(x - y\right) \]
  8. Add Preprocessing

Alternative 16: 50.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{+241}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.0000000000000001e241

    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 54.3%

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

    if 1.0000000000000001e241 < y

    1. Initial program 99.5%

      \[\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. Taylor expanded in y around inf 89.9%

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

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

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

Alternative 17: 49.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.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 52.6%

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

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