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

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

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

\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\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. 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, \left(x - y\right) \cdot \frac{60}{z - t}\right) \]
  6. Add Preprocessing

Alternative 3: 74.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+42} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-81} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-91}\right) \land a \cdot 120 \leq 6 \cdot 10^{+81}\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) -2e+42)
         (not
          (or (<= (* a 120.0) -5e-81)
              (and (not (<= (* a 120.0) -5e-91)) (<= (* a 120.0) 6e+81)))))
   (* 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) <= -2e+42) || !(((a * 120.0) <= -5e-81) || (!((a * 120.0) <= -5e-91) && ((a * 120.0) <= 6e+81)))) {
		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) <= (-2d+42)) .or. (.not. ((a * 120.0d0) <= (-5d-81)) .or. (.not. ((a * 120.0d0) <= (-5d-91))) .and. ((a * 120.0d0) <= 6d+81))) 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) <= -2e+42) || !(((a * 120.0) <= -5e-81) || (!((a * 120.0) <= -5e-91) && ((a * 120.0) <= 6e+81)))) {
		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) <= -2e+42) or not (((a * 120.0) <= -5e-81) or (not ((a * 120.0) <= -5e-91) and ((a * 120.0) <= 6e+81))):
		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) <= -2e+42) || !((Float64(a * 120.0) <= -5e-81) || (!(Float64(a * 120.0) <= -5e-91) && (Float64(a * 120.0) <= 6e+81))))
		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) <= -2e+42) || ~((((a * 120.0) <= -5e-81) || (~(((a * 120.0) <= -5e-91)) && ((a * 120.0) <= 6e+81)))))
		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], -2e+42], N[Not[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-81], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-91]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 6e+81]]]], $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 -2 \cdot 10^{+42} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-81} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-91}\right) \land a \cdot 120 \leq 6 \cdot 10^{+81}\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) < -2.00000000000000009e42 or -4.99999999999999981e-81 < (*.f64 a 120) < -4.99999999999999997e-91 or 5.99999999999999995e81 < (*.f64 a 120)

    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. Taylor expanded in z around inf 80.9%

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

    if -2.00000000000000009e42 < (*.f64 a 120) < -4.99999999999999981e-81 or -4.99999999999999997e-91 < (*.f64 a 120) < 5.99999999999999995e81

    1. Initial program 98.4%

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

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

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

Alternative 4: 85.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.29999999999999976e54 or 2.3999999999999998e-24 < t

    1. Initial program 98.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 0 93.8%

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

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

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

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

    if -4.29999999999999976e54 < t < -3.2e-108

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

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

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

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

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

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

    if -3.2e-108 < t < 2.3999999999999998e-24

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+54}:\\ \;\;\;\;\frac{-60}{\frac{t}{x - y}} + a \cdot 120\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-108}:\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-24}:\\ \;\;\;\;\frac{60}{\frac{z}{x - y}} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{t}{x - y}} + a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 88.9% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;\left(x - y\right) \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.40000000000000004e64 or 2.7999999999999999e91 < x

    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. 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/88.0%

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

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

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

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

    if -4.40000000000000004e64 < x < 1.95e32

    1. Initial program 99.1%

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

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

    if 1.95e32 < x < 2.7999999999999999e91

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

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

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

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

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

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

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

Alternative 6: 81.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-91} \lor \neg \left(a \cdot 120 \leq 0.002\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 (<= (* a 120.0) -5e-91) (not (<= (* a 120.0) 0.002)))
   (+ (* 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 (((a * 120.0) <= -5e-91) || !((a * 120.0) <= 0.002)) {
		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 (((a * 120.0d0) <= (-5d-91)) .or. (.not. ((a * 120.0d0) <= 0.002d0))) 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 (((a * 120.0) <= -5e-91) || !((a * 120.0) <= 0.002)) {
		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 ((a * 120.0) <= -5e-91) or not ((a * 120.0) <= 0.002):
		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(a * 120.0) <= -5e-91) || !(Float64(a * 120.0) <= 0.002))
		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 (((a * 120.0) <= -5e-91) || ~(((a * 120.0) <= 0.002)))
		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[(a * 120.0), $MachinePrecision], -5e-91], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 0.002]], $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}\;a \cdot 120 \leq -5 \cdot 10^{-91} \lor \neg \left(a \cdot 120 \leq 0.002\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 a 120) < -4.99999999999999997e-91 or 2e-3 < (*.f64 a 120)

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

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

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

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

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

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

    if -4.99999999999999997e-91 < (*.f64 a 120) < 2e-3

    1. Initial program 97.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. Taylor expanded in a around 0 86.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-91} \lor \neg \left(a \cdot 120 \leq 0.002\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 7: 73.8% accurate, 0.6× speedup?

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

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

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

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


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

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

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

    if -2.00000000000000009e42 < (*.f64 a 120) < 1.00000000000000004e62

    1. Initial program 98.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 78.2%

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

    if 1.00000000000000004e62 < (*.f64 a 120)

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

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

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

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

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

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

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

Alternative 8: 57.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 0.00053:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.70000000000000003e-99 or 5.29999999999999981e-4 < a

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

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

    if -1.70000000000000003e-99 < a < -1.99999999999999988e-278

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

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

    if -1.99999999999999988e-278 < a < 5.29999999999999981e-4

    1. Initial program 96.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-99}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-278}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 0.00053:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 0.094:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.2e-97 or 0.094 < a

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

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

    if -1.2e-97 < a < -8.00000000000000044e-279

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

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

    if -8.00000000000000044e-279 < a < 0.094

    1. Initial program 96.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
    11. Applied egg-rr52.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-279}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 0.094:\\ \;\;\;\;y \cdot \frac{-60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{-93} \lor \neg \left(a \leq 2.75 \cdot 10^{-5}\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.25e-93) (not (<= a 2.75e-5)))
   (* 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.25e-93) || !(a <= 2.75e-5)) {
		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.25d-93)) .or. (.not. (a <= 2.75d-5))) 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.25e-93) || !(a <= 2.75e-5)) {
		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.25e-93) or not (a <= 2.75e-5):
		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.25e-93) || !(a <= 2.75e-5))
		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.25e-93) || ~((a <= 2.75e-5)))
		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.25e-93], N[Not[LessEqual[a, 2.75e-5]], $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.25 \cdot 10^{-93} \lor \neg \left(a \leq 2.75 \cdot 10^{-5}\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.2500000000000001e-93 or 2.7500000000000001e-5 < a

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

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

    if -2.2500000000000001e-93 < a < 2.7500000000000001e-5

    1. Initial program 97.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.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 y around inf 42.1%

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

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

Alternative 11: 52.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+257}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+205}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.00000000000000006e257

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    9. Simplified84.4%

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

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

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
    11. Applied egg-rr84.6%

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

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

    if -2.00000000000000006e257 < y < 4.00000000000000007e205

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

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

    if 4.00000000000000007e205 < y

    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.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 y around inf 76.6%

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

      \[\leadsto -60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{t}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/67.9%

        \[\leadsto -60 \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. neg-mul-167.9%

        \[\leadsto -60 \cdot \frac{\color{blue}{-y}}{t} \]
    10. Simplified67.9%

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

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

Alternative 12: 52.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+256}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+205}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.80000000000000037e256

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    9. Simplified84.4%

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

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

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
    11. Applied egg-rr84.6%

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

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

    if -7.80000000000000037e256 < y < 5.1999999999999998e205

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

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

    if 5.1999999999999998e205 < y

    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.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 y around inf 76.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{+256}:\\ \;\;\;\;y \cdot \frac{-60}{z}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+205}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{60}{t}\\ \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: 51.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+256}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9000000000000001e256

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

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

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

    if -1.9000000000000001e256 < y

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

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

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

Alternative 15: 51.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+255}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.95000000000000018e255

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    9. Simplified84.4%

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

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

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
    11. Applied egg-rr84.6%

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

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

    if -1.95000000000000018e255 < y

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

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

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

Alternative 16: 50.6% 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 47.3%

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

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