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

Percentage Accurate: 99.4% → 99.7%
Time: 22.0s
Alternatives: 21
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 21 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.7% 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.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. Final simplification99.8%

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

Alternative 2: 81.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_3 \leq -1 \cdot 10^{+141}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_3 \leq -2 \cdot 10^{+73}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\

\mathbf{elif}\;t_3 \leq 10^{+155}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999995e211

    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. 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 a around 0 96.3%

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

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

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

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

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

    if -4.9999999999999995e211 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.00000000000000002e141 or -1.99999999999999997e73 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1.00000000000000001e155

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

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

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

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

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

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

    if -1.00000000000000002e141 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.99999999999999997e73

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num99.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified89.8%

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

    if 1.00000000000000001e155 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{+211}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -1 \cdot 10^{+141}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -2 \cdot 10^{+73}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 10^{+155}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \end{array} \]

Alternative 3: 72.2% 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^{+211}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{+141}:\\ \;\;\;\;a \cdot 120 + \frac{x}{\frac{t}{-60}}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-40}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;t_1 \leq 10^{-29}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_1 -5e+211)
     (* (- x y) (/ 60.0 (- z t)))
     (if (<= t_1 -1e+141)
       (+ (* a 120.0) (/ x (/ t -60.0)))
       (if (<= t_1 -5e-40)
         (/ 60.0 (/ (- z t) (- x y)))
         (if (<= t_1 1e-29) (* a 120.0) (* 60.0 (/ (- x y) (- 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+211) {
		tmp = (x - y) * (60.0 / (z - t));
	} else if (t_1 <= -1e+141) {
		tmp = (a * 120.0) + (x / (t / -60.0));
	} else if (t_1 <= -5e-40) {
		tmp = 60.0 / ((z - t) / (x - y));
	} else if (t_1 <= 1e-29) {
		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) :: t_1
    real(8) :: tmp
    t_1 = (60.0d0 * (x - y)) / (z - t)
    if (t_1 <= (-5d+211)) then
        tmp = (x - y) * (60.0d0 / (z - t))
    else if (t_1 <= (-1d+141)) then
        tmp = (a * 120.0d0) + (x / (t / (-60.0d0)))
    else if (t_1 <= (-5d-40)) then
        tmp = 60.0d0 / ((z - t) / (x - y))
    else if (t_1 <= 1d-29) 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 t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_1 <= -5e+211) {
		tmp = (x - y) * (60.0 / (z - t));
	} else if (t_1 <= -1e+141) {
		tmp = (a * 120.0) + (x / (t / -60.0));
	} else if (t_1 <= -5e-40) {
		tmp = 60.0 / ((z - t) / (x - y));
	} else if (t_1 <= 1e-29) {
		tmp = a * 120.0;
	} else {
		tmp = 60.0 * ((x - y) / (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+211:
		tmp = (x - y) * (60.0 / (z - t))
	elif t_1 <= -1e+141:
		tmp = (a * 120.0) + (x / (t / -60.0))
	elif t_1 <= -5e-40:
		tmp = 60.0 / ((z - t) / (x - y))
	elif t_1 <= 1e-29:
		tmp = a * 120.0
	else:
		tmp = 60.0 * ((x - y) / (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+211)
		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
	elseif (t_1 <= -1e+141)
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(t / -60.0)));
	elseif (t_1 <= -5e-40)
		tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)));
	elseif (t_1 <= 1e-29)
		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)
	t_1 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_1 <= -5e+211)
		tmp = (x - y) * (60.0 / (z - t));
	elseif (t_1 <= -1e+141)
		tmp = (a * 120.0) + (x / (t / -60.0));
	elseif (t_1 <= -5e-40)
		tmp = 60.0 / ((z - t) / (x - y));
	elseif (t_1 <= 1e-29)
		tmp = a * 120.0;
	else
		tmp = 60.0 * ((x - y) / (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[LessEqual[t$95$1, -5e+211], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e+141], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t / -60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-40], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-29], 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}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+211}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{t}{-60}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999995e211

    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. 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 a around 0 96.3%

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

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

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

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

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

    if -4.9999999999999995e211 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.00000000000000002e141

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. *-commutative38.0%

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    6. Simplified98.1%

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

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

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

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

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

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

    if -1.00000000000000002e141 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.99999999999999965e-40

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

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

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num99.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified82.1%

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

    if -4.99999999999999965e-40 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 9.99999999999999943e-30

    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 z around inf 81.5%

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

    if 9.99999999999999943e-30 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

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

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

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

Alternative 4: 74.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -8.4 \cdot 10^{-89}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-307}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;t \leq 0.02:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (* a 120.0) (* -60.0 (/ (- x y) t)))))
   (if (<= t -8.4e-89)
     t_1
     (if (<= t -3.7e-307)
       (* 60.0 (/ (- x y) (- z t)))
       (if (<= t 0.02) (+ (* a 120.0) (* -60.0 (/ y z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a * 120.0) + (-60.0 * ((x - y) / t));
	double tmp;
	if (t <= -8.4e-89) {
		tmp = t_1;
	} else if (t <= -3.7e-307) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (t <= 0.02) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
    if (t <= (-8.4d-89)) then
        tmp = t_1
    else if (t <= (-3.7d-307)) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else if (t <= 0.02d0) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
    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 * ((x - y) / t));
	double tmp;
	if (t <= -8.4e-89) {
		tmp = t_1;
	} else if (t <= -3.7e-307) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (t <= 0.02) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a * 120.0) + (-60.0 * ((x - y) / t))
	tmp = 0
	if t <= -8.4e-89:
		tmp = t_1
	elif t <= -3.7e-307:
		tmp = 60.0 * ((x - y) / (z - t))
	elif t <= 0.02:
		tmp = (a * 120.0) + (-60.0 * (y / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t)))
	tmp = 0.0
	if (t <= -8.4e-89)
		tmp = t_1;
	elseif (t <= -3.7e-307)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	elseif (t <= 0.02)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (a * 120.0) + (-60.0 * ((x - y) / t));
	tmp = 0.0;
	if (t <= -8.4e-89)
		tmp = t_1;
	elseif (t <= -3.7e-307)
		tmp = 60.0 * ((x - y) / (z - t));
	elseif (t <= 0.02)
		tmp = (a * 120.0) + (-60.0 * (y / z));
	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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.4e-89], t$95$1, If[LessEqual[t, -3.7e-307], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.02], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.4000000000000004e-89 or 0.0200000000000000004 < t

    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 z around 0 85.4%

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

    if -8.4000000000000004e-89 < t < -3.7e-307

    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 a around 0 80.0%

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

    if -3.7e-307 < t < 0.0200000000000000004

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.4 \cdot 10^{-89}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-307}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;t \leq 0.02:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 5: 73.1% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

    if -4.9999999999999998e30 < (*.f64 a 120) < 1

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

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

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

Alternative 6: 72.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+30}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

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

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


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

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

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

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

    if -4.9999999999999998e30 < (*.f64 a 120) < 9.99999999999999996e-71

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

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

    if 9.99999999999999996e-71 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{-\left(z - t\right)}}{y}} \]
    6. Simplified87.8%

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{t}{y}}} + a \cdot 120 \]
    9. Simplified70.8%

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

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

Alternative 7: 57.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{+175}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 720000000000:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{+63}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;x \leq 5.7 \cdot 10^{+166}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.50000000000000018e175 or 5.69999999999999977e166 < x

    1. Initial program 99.7%

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

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

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

    if -5.50000000000000018e175 < x < 7.2e11 or 2.50000000000000005e63 < x < 5.69999999999999977e166

    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 z around inf 58.0%

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

    if 7.2e11 < x < 2.50000000000000005e63

    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. 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. Step-by-step derivation
      1. clear-num99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified85.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{+175}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;x \leq 720000000000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+63}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;x \leq 5.7 \cdot 10^{+166}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \end{array} \]

Alternative 8: 57.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+175}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 400000000000:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+61}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\

\mathbf{elif}\;x \leq 8.4 \cdot 10^{+170}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.19999999999999968e175 or 8.39999999999999991e170 < x

    1. Initial program 99.7%

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

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

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

    if -6.19999999999999968e175 < x < 4e11 or 1.0500000000000001e61 < x < 8.39999999999999991e170

    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 z around inf 58.0%

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

    if 4e11 < x < 1.0500000000000001e61

    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. 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 a around 0 85.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.2 \cdot 10^{+175}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;x \leq 400000000000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+61}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;x \leq 8.4 \cdot 10^{+170}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \end{array} \]

Alternative 9: 57.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+176}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\

\mathbf{elif}\;x \leq 190000000000:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+61}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+168}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.02000000000000001e176

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num99.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified76.8%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. *-commutative68.0%

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    13. Simplified68.0%

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

    if -1.02000000000000001e176 < x < 1.9e11 or 1.75000000000000009e61 < x < 4.50000000000000012e168

    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 z around inf 58.0%

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

    if 1.9e11 < x < 1.75000000000000009e61

    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. 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 a around 0 85.9%

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

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

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

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

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

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

    if 4.50000000000000012e168 < x

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.02 \cdot 10^{+176}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;x \leq 190000000000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+61}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+168}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \end{array} \]

Alternative 10: 55.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{\frac{t - z}{y}}\\
\mathbf{if}\;y \leq -9.1 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-213}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+67}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.0999999999999997e86 or 1.20000000000000001e67 < 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.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. Step-by-step derivation
      1. associate-/r/99.6%

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

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num99.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified74.7%

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{-\left(z - t\right)}}{y}} \]
    13. Simplified58.3%

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

    if -9.0999999999999997e86 < y < 5.7999999999999999e-213 or 1.2000000000000001e-146 < y < 1.20000000000000001e67

    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 z around inf 65.0%

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

    if 5.7999999999999999e-213 < y < 1.2000000000000001e-146

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

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

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified80.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. *-commutative80.9%

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    13. Simplified80.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.1 \cdot 10^{+86}:\\ \;\;\;\;\frac{60}{\frac{t - z}{y}}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-213}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-146}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+67}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{60}{\frac{t - z}{y}}\\ \end{array} \]

Alternative 11: 89.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1620 or 1.3e88 < x

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. *-commutative55.1%

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    6. Simplified91.7%

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

    if -1620 < x < 1.3e88

    1. Initial program 99.8%

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

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

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

Alternative 12: 89.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3800 or 1.99999999999999992e88 < x

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. *-commutative55.1%

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z - t} \]
    6. Simplified91.7%

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

    if -3800 < x < 1.99999999999999992e88

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{-\left(z - t\right)}}{y}} \]
    6. Simplified96.0%

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

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

Alternative 13: 82.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.5999999999999998e-208

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

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

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

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

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

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

    if -3.5999999999999998e-208 < t < 175000

    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 z around inf 93.7%

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

    if 175000 < t

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{-208}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;t \leq 175000:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 14: 82.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.14999999999999996e-208

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

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

    if -3.14999999999999996e-208 < t < 0.016500000000000001

    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 z around inf 93.7%

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

    if 0.016500000000000001 < t

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.15 \cdot 10^{-208}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;t \leq 0.0165:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 15: 89.7% accurate, 0.9× speedup?

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

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

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

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


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

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

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

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

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

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

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

    if -195 < x < 2.94999999999999984e88

    1. Initial program 99.8%

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

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

    if 2.94999999999999984e88 < x

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -195:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{+88}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \end{array} \]

Alternative 16: 74.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.19999999999999933e25 or 3.99999999999999986e-64 < 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 70.8%

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

    if -8.19999999999999933e25 < a < 3.99999999999999986e-64

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

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

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

Alternative 17: 99.7% 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.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. Step-by-step derivation
    1. associate-/r/99.7%

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

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

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

Alternative 18: 58.9% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.2999999999999996e-121 or 6.79999999999999973e-65 < a

    1. Initial program 99.8%

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

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

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

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

    if -7.2999999999999996e-121 < a < 6.79999999999999973e-65

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

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

      \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x - y\right)} + a \cdot 120 \]
    6. Step-by-step derivation
      1. clear-num99.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    10. Simplified82.7%

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

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

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

Alternative 19: 50.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+96} \lor \neg \left(y \leq 2.1 \cdot 10^{+228}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.0999999999999999e96 or 2.09999999999999994e228 < 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.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 64.6%

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

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

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

    if -1.0999999999999999e96 < y < 2.09999999999999994e228

    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 z around inf 55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+96} \lor \neg \left(y \leq 2.1 \cdot 10^{+228}\right):\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 20: 50.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+226}:\\
\;\;\;\;a \cdot 120\\

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


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

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

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

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

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

    if -5.10000000000000003e95 < y < 2.4e226

    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 z around inf 55.1%

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

    if 2.4e226 < y

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
    8. Applied egg-rr65.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+95}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+226}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -60}{z}\\ \end{array} \]

Alternative 21: 50.7% accurate, 4.3× speedup?

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

\\
a \cdot 120
\end{array}
Derivation
  1. Initial program 99.7%

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. 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 47.3%

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.7% 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 2023285 
(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)))