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

Percentage Accurate: 99.4% → 99.8%
Time: 12.5s
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, 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}
Derivation
  1. Initial program 99.4%

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Step-by-step derivation
    1. associate-/l*99.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. Final simplification99.8%

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

Alternative 2: 72.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_2 \leq -5 \cdot 10^{+170}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-87}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;t_2 \leq 10^{-43} \lor \neg \left(t_2 \leq 2 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e191 or -4.99999999999999977e170 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.99999999999999991e37 or 5.00000000000000042e-87 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1.00000000000000008e-43 or 2e21 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 98.9%

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

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

    if -5.0000000000000002e191 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.99999999999999977e170

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e37 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5.00000000000000042e-87

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

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

    if 1.00000000000000008e-43 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2e21

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

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

        \[\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 \]
    6. Simplified89.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{+191}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{+170}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -2 \cdot 10^{+37}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 5 \cdot 10^{-87}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 10^{-43} \lor \neg \left(\frac{60 \cdot \left(x - y\right)}{z - t} \leq 2 \cdot 10^{+21}\right):\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \end{array} \]

Alternative 3: 80.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+301} \lor \neg \left(t_1 \leq -5 \cdot 10^{+153}\right) \land \left(t_1 \leq -1 \cdot 10^{+76} \lor \neg \left(t_1 \leq 2 \cdot 10^{+70}\right)\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e301 or -5.00000000000000018e153 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1e76 or 2.00000000000000015e70 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

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

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

    if -5.0000000000000004e301 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.00000000000000018e153 or -1e76 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2.00000000000000015e70

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} + a \cdot 120 \]
    5. 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 \]
    6. Simplified84.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{+301} \lor \neg \left(\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{+153}\right) \land \left(\frac{60 \cdot \left(x - y\right)}{z - t} \leq -1 \cdot 10^{+76} \lor \neg \left(\frac{60 \cdot \left(x - y\right)}{z - t} \leq 2 \cdot 10^{+70}\right)\right):\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]

Alternative 4: 70.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -0.001:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-86}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \cdot 120 \leq 2000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 99.9%

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

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

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

    if -2.00000000000000002e55 < (*.f64 a 120) < -1e-3 or -4.9999999999999999e-86 < (*.f64 a 120) < 5.0000000000000001e-60 or 1e-26 < (*.f64 a 120) < 2e3

    1. Initial program 98.9%

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

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

    if -1e-3 < (*.f64 a 120) < -4.9999999999999999e-86

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

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

    if 5.0000000000000001e-60 < (*.f64 a 120) < 1e-26

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+55}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -0.001:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-86}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-26}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2000:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 5: 73.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+48} \lor \neg \left(a \leq -1.1 \cdot 10^{-6}\right) \land \left(a \leq -3.8 \cdot 10^{-88} \lor \neg \left(a \leq 44\right) \land \left(a \leq 9 \cdot 10^{+40} \lor \neg \left(a \leq 1.25 \cdot 10^{+63}\right)\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.8e+48)
         (and (not (<= a -1.1e-6))
              (or (<= a -3.8e-88)
                  (and (not (<= a 44.0))
                       (or (<= a 9e+40) (not (<= a 1.25e+63)))))))
   (* 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.8e+48) || (!(a <= -1.1e-6) && ((a <= -3.8e-88) || (!(a <= 44.0) && ((a <= 9e+40) || !(a <= 1.25e+63)))))) {
		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.8d+48)) .or. (.not. (a <= (-1.1d-6))) .and. (a <= (-3.8d-88)) .or. (.not. (a <= 44.0d0)) .and. (a <= 9d+40) .or. (.not. (a <= 1.25d+63))) 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.8e+48) || (!(a <= -1.1e-6) && ((a <= -3.8e-88) || (!(a <= 44.0) && ((a <= 9e+40) || !(a <= 1.25e+63)))))) {
		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.8e+48) or (not (a <= -1.1e-6) and ((a <= -3.8e-88) or (not (a <= 44.0) and ((a <= 9e+40) or not (a <= 1.25e+63))))):
		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.8e+48) || (!(a <= -1.1e-6) && ((a <= -3.8e-88) || (!(a <= 44.0) && ((a <= 9e+40) || !(a <= 1.25e+63))))))
		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.8e+48) || (~((a <= -1.1e-6)) && ((a <= -3.8e-88) || (~((a <= 44.0)) && ((a <= 9e+40) || ~((a <= 1.25e+63)))))))
		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.8e+48], And[N[Not[LessEqual[a, -1.1e-6]], $MachinePrecision], Or[LessEqual[a, -3.8e-88], And[N[Not[LessEqual[a, 44.0]], $MachinePrecision], Or[LessEqual[a, 9e+40], N[Not[LessEqual[a, 1.25e+63]], $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.8 \cdot 10^{+48} \lor \neg \left(a \leq -1.1 \cdot 10^{-6}\right) \land \left(a \leq -3.8 \cdot 10^{-88} \lor \neg \left(a \leq 44\right) \land \left(a \leq 9 \cdot 10^{+40} \lor \neg \left(a \leq 1.25 \cdot 10^{+63}\right)\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.79999999999999992e48 or -1.1000000000000001e-6 < a < -3.80000000000000011e-88 or 44 < a < 9.00000000000000064e40 or 1.25000000000000003e63 < 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. Taylor expanded in z around inf 76.6%

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

    if -1.79999999999999992e48 < a < -1.1000000000000001e-6 or -3.80000000000000011e-88 < a < 44 or 9.00000000000000064e40 < a < 1.25000000000000003e63

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+48} \lor \neg \left(a \leq -1.1 \cdot 10^{-6}\right) \land \left(a \leq -3.8 \cdot 10^{-88} \lor \neg \left(a \leq 44\right) \land \left(a \leq 9 \cdot 10^{+40} \lor \neg \left(a \leq 1.25 \cdot 10^{+63}\right)\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]

Alternative 6: 66.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\ t_2 := a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-83}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-138}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (* a 120.0) (* -60.0 (/ y z))))
        (t_2 (+ (* a 120.0) (* x (/ -60.0 t)))))
   (if (<= z -2.8e+51)
     t_1
     (if (<= z -2.9e-83)
       (+ (* a 120.0) (* 60.0 (/ y t)))
       (if (<= z -2e-236)
         t_2
         (if (<= z 5.2e-138)
           (* 60.0 (/ (- x y) (- z t)))
           (if (<= z 8.6e-14) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a * 120.0) + (-60.0 * (y / z));
	double t_2 = (a * 120.0) + (x * (-60.0 / t));
	double tmp;
	if (z <= -2.8e+51) {
		tmp = t_1;
	} else if (z <= -2.9e-83) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (z <= -2e-236) {
		tmp = t_2;
	} else if (z <= 5.2e-138) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (z <= 8.6e-14) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a * 120.0d0) + ((-60.0d0) * (y / z))
    t_2 = (a * 120.0d0) + (x * ((-60.0d0) / t))
    if (z <= (-2.8d+51)) then
        tmp = t_1
    else if (z <= (-2.9d-83)) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if (z <= (-2d-236)) then
        tmp = t_2
    else if (z <= 5.2d-138) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else if (z <= 8.6d-14) then
        tmp = t_2
    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 = (a * 120.0) + (-60.0 * (y / z));
	double t_2 = (a * 120.0) + (x * (-60.0 / t));
	double tmp;
	if (z <= -2.8e+51) {
		tmp = t_1;
	} else if (z <= -2.9e-83) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (z <= -2e-236) {
		tmp = t_2;
	} else if (z <= 5.2e-138) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (z <= 8.6e-14) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a * 120.0) + (-60.0 * (y / z))
	t_2 = (a * 120.0) + (x * (-60.0 / t))
	tmp = 0
	if z <= -2.8e+51:
		tmp = t_1
	elif z <= -2.9e-83:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif z <= -2e-236:
		tmp = t_2
	elif z <= 5.2e-138:
		tmp = 60.0 * ((x - y) / (z - t))
	elif z <= 8.6e-14:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)))
	t_2 = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t)))
	tmp = 0.0
	if (z <= -2.8e+51)
		tmp = t_1;
	elseif (z <= -2.9e-83)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (z <= -2e-236)
		tmp = t_2;
	elseif (z <= 5.2e-138)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	elseif (z <= 8.6e-14)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (a * 120.0) + (-60.0 * (y / z));
	t_2 = (a * 120.0) + (x * (-60.0 / t));
	tmp = 0.0;
	if (z <= -2.8e+51)
		tmp = t_1;
	elseif (z <= -2.9e-83)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif (z <= -2e-236)
		tmp = t_2;
	elseif (z <= 5.2e-138)
		tmp = 60.0 * ((x - y) / (z - t));
	elseif (z <= 8.6e-14)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+51], t$95$1, If[LessEqual[z, -2.9e-83], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-236], t$95$2, If[LessEqual[z, 5.2e-138], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e-14], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-236}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 8.6 \cdot 10^{-14}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.80000000000000005e51 or 8.59999999999999996e-14 < z

    1. Initial program 99.8%

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

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

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

    if -2.80000000000000005e51 < z < -2.8999999999999999e-83

    1. Initial program 96.0%

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

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

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

    if -2.8999999999999999e-83 < z < -2.0000000000000001e-236 or 5.2e-138 < z < 8.59999999999999996e-14

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

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

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

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

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

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

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

    if -2.0000000000000001e-236 < z < 5.2e-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.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. Taylor expanded in a around 0 88.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+51}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-83}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-236}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-138}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-14}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 7: 66.6% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-236}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.02000000000000002e52

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z}} + a \cdot 120 \]
    11. Simplified80.5%

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

    if -1.02000000000000002e52 < z < -7.80000000000000045e-84

    1. Initial program 96.0%

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

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

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

    if -7.80000000000000045e-84 < z < -2.6e-236 or 7.00000000000000011e-143 < z < 1.70000000000000008e-13

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

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

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

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

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

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

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

    if -2.6e-236 < z < 7.00000000000000011e-143

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

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

    if 1.70000000000000008e-13 < z

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+52}:\\ \;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-84}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-236}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-143}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-13}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 8: 70.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -9.6 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-88}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 45:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
        (t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
   (if (<= a -9.6e+51)
     t_2
     (if (<= a -3.3e-14)
       t_1
       (if (<= a -4.1e-88) (* a 120.0) (if (<= a 45.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double t_2 = (a * 120.0) + (-60.0 * (y / z));
	double tmp;
	if (a <= -9.6e+51) {
		tmp = t_2;
	} else if (a <= -3.3e-14) {
		tmp = t_1;
	} else if (a <= -4.1e-88) {
		tmp = a * 120.0;
	} else if (a <= 45.0) {
		tmp = 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 * ((x - y) / (z - t))
    t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
    if (a <= (-9.6d+51)) then
        tmp = t_2
    else if (a <= (-3.3d-14)) then
        tmp = t_1
    else if (a <= (-4.1d-88)) then
        tmp = a * 120.0d0
    else if (a <= 45.0d0) then
        tmp = 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 * ((x - y) / (z - t));
	double t_2 = (a * 120.0) + (-60.0 * (y / z));
	double tmp;
	if (a <= -9.6e+51) {
		tmp = t_2;
	} else if (a <= -3.3e-14) {
		tmp = t_1;
	} else if (a <= -4.1e-88) {
		tmp = a * 120.0;
	} else if (a <= 45.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	t_2 = (a * 120.0) + (-60.0 * (y / z))
	tmp = 0
	if a <= -9.6e+51:
		tmp = t_2
	elif a <= -3.3e-14:
		tmp = t_1
	elif a <= -4.1e-88:
		tmp = a * 120.0
	elif a <= 45.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))
	t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)))
	tmp = 0.0
	if (a <= -9.6e+51)
		tmp = t_2;
	elseif (a <= -3.3e-14)
		tmp = t_1;
	elseif (a <= -4.1e-88)
		tmp = Float64(a * 120.0);
	elseif (a <= 45.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / (z - t));
	t_2 = (a * 120.0) + (-60.0 * (y / z));
	tmp = 0.0;
	if (a <= -9.6e+51)
		tmp = t_2;
	elseif (a <= -3.3e-14)
		tmp = t_1;
	elseif (a <= -4.1e-88)
		tmp = a * 120.0;
	elseif (a <= 45.0)
		tmp = 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[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.6e+51], t$95$2, If[LessEqual[a, -3.3e-14], t$95$1, If[LessEqual[a, -4.1e-88], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 45.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.3 \cdot 10^{-14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-88}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 45:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.5999999999999994e51 or 45 < a

    1. Initial program 99.9%

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

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

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

    if -9.5999999999999994e51 < a < -3.2999999999999998e-14 or -4.1000000000000001e-88 < a < 45

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

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

    if -3.2999999999999998e-14 < a < -4.1000000000000001e-88

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{+51}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-14}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-88}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 45:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 9: 78.1% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.52e-77

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

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

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

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

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

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

    if -1.52e-77 < t < 1.10000000000000006e-104

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

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

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

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

    if 1.10000000000000006e-104 < t < 0.0018500000000000001

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

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

    if 0.0018500000000000001 < t

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{-77}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-104}:\\ \;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\ \mathbf{elif}\;t \leq 0.00185:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 10: 89.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.9000000000000001e-25 or 5.2000000000000002e51 < x

    1. Initial program 99.1%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t}} + a \cdot 120 \]
    5. 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.7%

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

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

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

    if -2.9000000000000001e-25 < x < 5.2000000000000002e51

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-25} \lor \neg \left(x \leq 5.2 \cdot 10^{+51}\right):\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\ \end{array} \]

Alternative 11: 99.8% accurate, 1.0× speedup?

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

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

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Step-by-step derivation
    1. associate-/l*99.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. Step-by-step derivation
    1. associate-/r/99.8%

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

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

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

Alternative 12: 56.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+145} \lor \neg \left(y \leq 2.26 \cdot 10^{+232}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.80000000000000006e145 or 2.26000000000000003e232 < y

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

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

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

    if -9.80000000000000006e145 < y < 2.26000000000000003e232

    1. Initial program 99.4%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in z around inf 55.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{+145} \lor \neg \left(y \leq 2.26 \cdot 10^{+232}\right):\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 13: 58.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-91}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.56 \cdot 10^{-61}:\\ \;\;\;\;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.4e-91)
   (* a 120.0)
   (if (<= a 1.56e-61) (* 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.4e-91) {
		tmp = a * 120.0;
	} else if (a <= 1.56e-61) {
		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.4d-91)) then
        tmp = a * 120.0d0
    else if (a <= 1.56d-61) 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.4e-91) {
		tmp = a * 120.0;
	} else if (a <= 1.56e-61) {
		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.4e-91:
		tmp = a * 120.0
	elif a <= 1.56e-61:
		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.4e-91)
		tmp = Float64(a * 120.0);
	elseif (a <= 1.56e-61)
		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.4e-91)
		tmp = a * 120.0;
	elseif (a <= 1.56e-61)
		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.4e-91], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.56e-61], 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.4 \cdot 10^{-91}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4e-91 or 1.5600000000000001e-61 < a

    1. Initial program 99.3%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in z around inf 68.2%

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

    if -1.4e-91 < a < 1.5600000000000001e-61

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-91}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.56 \cdot 10^{-61}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 14: 58.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 210:\\
\;\;\;\;\frac{x - y}{\frac{t}{-60}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.0000000000000001e-113 or 210 < a

    1. Initial program 99.3%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in z around inf 70.0%

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

    if -3.0000000000000001e-113 < a < 210

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Step-by-step derivation
      1. expm1-log1p-u54.6%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    6. Applied egg-rr27.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def54.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p79.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{\frac{t}{-60}}} \]
    11. Simplified51.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{-113}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 210:\\ \;\;\;\;\frac{x - y}{\frac{t}{-60}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 15: 50.4% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 99.4%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in z around inf 52.4%

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

    if 5.00000000000000034e245 < y

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

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

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

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

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

        \[\leadsto -60 \cdot \frac{\color{blue}{-y}}{t} \]
    8. Simplified62.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{+245}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{-y}{t}\\ \end{array} \]

Alternative 16: 50.2% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 99.4%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in z around inf 51.5%

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

    if 4.0000000000000002e270 < y

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4 \cdot 10^{+270}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 17: 49.8% 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.4%

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

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

    \[\leadsto a \cdot 120 \]

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 2023268 
(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)))