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

Percentage Accurate: 99.3% → 99.8%
Time: 13.9s
Alternatives: 19
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 19 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 57.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x}{z - t}\\ t_2 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{-98}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-200}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-297}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.14 \cdot 10^{-178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-56}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ x (- z t)))) (t_2 (* -60.0 (/ y (- z t)))))
   (if (<= a -2.3e-98)
     (* a 120.0)
     (if (<= a -9.6e-200)
       t_2
       (if (<= a -2.1e-243)
         t_1
         (if (<= a -2.6e-297)
           t_2
           (if (<= a 1.14e-178)
             t_1
             (if (<= a 1.65e-56)
               t_2
               (if (<= a 1.25e+25) t_1 (* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double t_2 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -2.3e-98) {
		tmp = a * 120.0;
	} else if (a <= -9.6e-200) {
		tmp = t_2;
	} else if (a <= -2.1e-243) {
		tmp = t_1;
	} else if (a <= -2.6e-297) {
		tmp = t_2;
	} else if (a <= 1.14e-178) {
		tmp = t_1;
	} else if (a <= 1.65e-56) {
		tmp = t_2;
	} else if (a <= 1.25e+25) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 60.0d0 * (x / (z - t))
    t_2 = (-60.0d0) * (y / (z - t))
    if (a <= (-2.3d-98)) then
        tmp = a * 120.0d0
    else if (a <= (-9.6d-200)) then
        tmp = t_2
    else if (a <= (-2.1d-243)) then
        tmp = t_1
    else if (a <= (-2.6d-297)) then
        tmp = t_2
    else if (a <= 1.14d-178) then
        tmp = t_1
    else if (a <= 1.65d-56) then
        tmp = t_2
    else if (a <= 1.25d+25) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double t_2 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -2.3e-98) {
		tmp = a * 120.0;
	} else if (a <= -9.6e-200) {
		tmp = t_2;
	} else if (a <= -2.1e-243) {
		tmp = t_1;
	} else if (a <= -2.6e-297) {
		tmp = t_2;
	} else if (a <= 1.14e-178) {
		tmp = t_1;
	} else if (a <= 1.65e-56) {
		tmp = t_2;
	} else if (a <= 1.25e+25) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * (x / (z - t))
	t_2 = -60.0 * (y / (z - t))
	tmp = 0
	if a <= -2.3e-98:
		tmp = a * 120.0
	elif a <= -9.6e-200:
		tmp = t_2
	elif a <= -2.1e-243:
		tmp = t_1
	elif a <= -2.6e-297:
		tmp = t_2
	elif a <= 1.14e-178:
		tmp = t_1
	elif a <= 1.65e-56:
		tmp = t_2
	elif a <= 1.25e+25:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(x / Float64(z - t)))
	t_2 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (a <= -2.3e-98)
		tmp = Float64(a * 120.0);
	elseif (a <= -9.6e-200)
		tmp = t_2;
	elseif (a <= -2.1e-243)
		tmp = t_1;
	elseif (a <= -2.6e-297)
		tmp = t_2;
	elseif (a <= 1.14e-178)
		tmp = t_1;
	elseif (a <= 1.65e-56)
		tmp = t_2;
	elseif (a <= 1.25e+25)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * (x / (z - t));
	t_2 = -60.0 * (y / (z - t));
	tmp = 0.0;
	if (a <= -2.3e-98)
		tmp = a * 120.0;
	elseif (a <= -9.6e-200)
		tmp = t_2;
	elseif (a <= -2.1e-243)
		tmp = t_1;
	elseif (a <= -2.6e-297)
		tmp = t_2;
	elseif (a <= 1.14e-178)
		tmp = t_1;
	elseif (a <= 1.65e-56)
		tmp = t_2;
	elseif (a <= 1.25e+25)
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-98], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.6e-200], t$95$2, If[LessEqual[a, -2.1e-243], t$95$1, If[LessEqual[a, -2.6e-297], t$95$2, If[LessEqual[a, 1.14e-178], t$95$1, If[LessEqual[a, 1.65e-56], t$95$2, If[LessEqual[a, 1.25e+25], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-200}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-243}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-297}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.14 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-56}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+25}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.30000000000000001e-98 or 1.25000000000000006e25 < a

    1. Initial program 99.1%

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

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

    if -2.30000000000000001e-98 < a < -9.60000000000000006e-200 or -2.1000000000000001e-243 < a < -2.6000000000000001e-297 or 1.14e-178 < a < 1.64999999999999992e-56

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

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

    if -9.60000000000000006e-200 < a < -2.1000000000000001e-243 or -2.6000000000000001e-297 < a < 1.14e-178 or 1.64999999999999992e-56 < a < 1.25000000000000006e25

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-98}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-200}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-243}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-297}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.14 \cdot 10^{-178}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-56}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+25}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 3: 57.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-240}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.4 \cdot 10^{-297}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 10^{-56}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 7.4 \cdot 10^{+25}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.42e-92 or 7.3999999999999998e25 < a

    1. Initial program 99.1%

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

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

    if -1.42e-92 < a < -3.59999999999999965e-204

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. 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. Taylor expanded in y around inf 58.9%

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    7. Step-by-step derivation
      1. clear-num58.9%

        \[\leadsto -60 \cdot \color{blue}{\frac{1}{\frac{z - t}{y}}} \]
      2. un-div-inv59.0%

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    8. Applied egg-rr59.0%

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

    if -3.59999999999999965e-204 < a < -9.9999999999999997e-241 or -4.3999999999999997e-297 < a < 1.07999999999999995e-178 or 1e-56 < a < 7.3999999999999998e25

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

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

    if -9.9999999999999997e-241 < a < -4.3999999999999997e-297 or 1.07999999999999995e-178 < a < 1e-56

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{-92}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-204}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-240}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-297}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-178}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 10^{-56}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{+25}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 4: 57.6% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-240}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 10^{-178}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{+25}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.9000000000000002e-98 or 1.05e25 < a

    1. Initial program 99.1%

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

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

    if -1.9000000000000002e-98 < a < -4.0000000000000001e-202

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. 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. Taylor expanded in y around inf 58.9%

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    7. Step-by-step derivation
      1. clear-num58.9%

        \[\leadsto -60 \cdot \color{blue}{\frac{1}{\frac{z - t}{y}}} \]
      2. un-div-inv59.0%

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    8. Applied egg-rr59.0%

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

    if -4.0000000000000001e-202 < a < -1.29999999999999996e-240 or -2.89999999999999989e-297 < a < 9.9999999999999995e-179 or 2.6999999999999999e-58 < a < 1.05e25

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

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

    if -1.29999999999999996e-240 < a < -2.89999999999999989e-297

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

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

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

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

    if 9.9999999999999995e-179 < a < 2.6999999999999999e-58

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    8. Simplified55.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{-98}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-202}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-240}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-297}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 10^{-178}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-58}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+25}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 57.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot x}{z - t}\\ \mathbf{if}\;a \leq -5.4 \cdot 10^{-96}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-199}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-297}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-56}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 x) (- z t))))
   (if (<= a -5.4e-96)
     (* a 120.0)
     (if (<= a -6.5e-199)
       (/ -60.0 (/ (- z t) y))
       (if (<= a -1.9e-240)
         t_1
         (if (<= a -2.65e-297)
           (* -60.0 (/ y (- z t)))
           (if (<= a 1.02e-178)
             t_1
             (if (<= a 7.2e-56)
               (/ (* y -60.0) (- z t))
               (if (<= a 1.05e+25) t_1 (* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * x) / (z - t);
	double tmp;
	if (a <= -5.4e-96) {
		tmp = a * 120.0;
	} else if (a <= -6.5e-199) {
		tmp = -60.0 / ((z - t) / y);
	} else if (a <= -1.9e-240) {
		tmp = t_1;
	} else if (a <= -2.65e-297) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= 1.02e-178) {
		tmp = t_1;
	} else if (a <= 7.2e-56) {
		tmp = (y * -60.0) / (z - t);
	} else if (a <= 1.05e+25) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (60.0d0 * x) / (z - t)
    if (a <= (-5.4d-96)) then
        tmp = a * 120.0d0
    else if (a <= (-6.5d-199)) then
        tmp = (-60.0d0) / ((z - t) / y)
    else if (a <= (-1.9d-240)) then
        tmp = t_1
    else if (a <= (-2.65d-297)) then
        tmp = (-60.0d0) * (y / (z - t))
    else if (a <= 1.02d-178) then
        tmp = t_1
    else if (a <= 7.2d-56) then
        tmp = (y * (-60.0d0)) / (z - t)
    else if (a <= 1.05d+25) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * x) / (z - t);
	double tmp;
	if (a <= -5.4e-96) {
		tmp = a * 120.0;
	} else if (a <= -6.5e-199) {
		tmp = -60.0 / ((z - t) / y);
	} else if (a <= -1.9e-240) {
		tmp = t_1;
	} else if (a <= -2.65e-297) {
		tmp = -60.0 * (y / (z - t));
	} else if (a <= 1.02e-178) {
		tmp = t_1;
	} else if (a <= 7.2e-56) {
		tmp = (y * -60.0) / (z - t);
	} else if (a <= 1.05e+25) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (60.0 * x) / (z - t)
	tmp = 0
	if a <= -5.4e-96:
		tmp = a * 120.0
	elif a <= -6.5e-199:
		tmp = -60.0 / ((z - t) / y)
	elif a <= -1.9e-240:
		tmp = t_1
	elif a <= -2.65e-297:
		tmp = -60.0 * (y / (z - t))
	elif a <= 1.02e-178:
		tmp = t_1
	elif a <= 7.2e-56:
		tmp = (y * -60.0) / (z - t)
	elif a <= 1.05e+25:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * x) / Float64(z - t))
	tmp = 0.0
	if (a <= -5.4e-96)
		tmp = Float64(a * 120.0);
	elseif (a <= -6.5e-199)
		tmp = Float64(-60.0 / Float64(Float64(z - t) / y));
	elseif (a <= -1.9e-240)
		tmp = t_1;
	elseif (a <= -2.65e-297)
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	elseif (a <= 1.02e-178)
		tmp = t_1;
	elseif (a <= 7.2e-56)
		tmp = Float64(Float64(y * -60.0) / Float64(z - t));
	elseif (a <= 1.05e+25)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (60.0 * x) / (z - t);
	tmp = 0.0;
	if (a <= -5.4e-96)
		tmp = a * 120.0;
	elseif (a <= -6.5e-199)
		tmp = -60.0 / ((z - t) / y);
	elseif (a <= -1.9e-240)
		tmp = t_1;
	elseif (a <= -2.65e-297)
		tmp = -60.0 * (y / (z - t));
	elseif (a <= 1.02e-178)
		tmp = t_1;
	elseif (a <= 7.2e-56)
		tmp = (y * -60.0) / (z - t);
	elseif (a <= 1.05e+25)
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.4e-96], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.5e-199], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e-240], t$95$1, If[LessEqual[a, -2.65e-297], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e-178], t$95$1, If[LessEqual[a, 7.2e-56], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e+25], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-240}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{+25}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.3999999999999999e-96 or 1.05e25 < a

    1. Initial program 99.1%

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

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

    if -5.3999999999999999e-96 < a < -6.50000000000000017e-199

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. 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. Taylor expanded in y around inf 58.9%

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
    7. Step-by-step derivation
      1. clear-num58.9%

        \[\leadsto -60 \cdot \color{blue}{\frac{1}{\frac{z - t}{y}}} \]
      2. un-div-inv59.0%

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    8. Applied egg-rr59.0%

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

    if -6.50000000000000017e-199 < a < -1.89999999999999994e-240 or -2.6500000000000001e-297 < a < 1.02000000000000006e-178 or 7.19999999999999956e-56 < a < 1.05e25

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

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

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

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

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

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

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

    if -1.89999999999999994e-240 < a < -2.6500000000000001e-297

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

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

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

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

    if 1.02000000000000006e-178 < a < 7.19999999999999956e-56

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    8. Simplified55.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.4 \cdot 10^{-96}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-199}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-240}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{-297}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-178}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-56}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+25}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 6: 88.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -30 \lor \neg \left(y \leq 280000 \lor \neg \left(y \leq 2.05 \cdot 10^{+123}\right) \land y \leq 6.5 \cdot 10^{+171}\right):\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -30 or 2.8e5 < y < 2.04999999999999995e123 or 6.5e171 < y

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if -30 < y < 2.8e5 or 2.04999999999999995e123 < y < 6.5e171

    1. Initial program 99.1%

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

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

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

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

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

Alternative 7: 88.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+122} \lor \neg \left(y \leq 6.5 \cdot 10^{+171}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.00000000000000008e-5 or 2.8e5 < y < 7.5999999999999996e122 or 6.5e171 < y

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if -3.00000000000000008e-5 < y < 2.8e5

    1. Initial program 99.0%

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

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

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

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

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

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

    if 7.5999999999999996e122 < y < 6.5e171

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

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

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

Alternative 8: 88.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.45 \cdot 10^{+122} \lor \neg \left(y \leq 1.35 \cdot 10^{+172}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if -31.5 < y < 1.6e5

    1. Initial program 99.0%

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

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

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

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

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

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

    if 1.6e5 < y < 2.4499999999999999e122 or 1.35e172 < y

    1. Initial program 99.8%

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

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

    if 2.4499999999999999e122 < y < 1.35e172

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -31.5:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\ \mathbf{elif}\;y \leq 160000:\\ \;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+122} \lor \neg \left(y \leq 1.35 \cdot 10^{+172}\right):\\ \;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\ \end{array} \]

Alternative 9: 81.6% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 99.1%

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

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

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

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

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

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

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

    if -1.99999999999999999e-90 < (*.f64 a 120) < 2e20

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

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

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

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

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

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

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

Alternative 10: 74.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 99.0%

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

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

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

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

    if -2.00000000000000003e43 < (*.f64 a 120) < 2e27

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

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

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

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

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

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

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

Alternative 11: 50.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-283}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-145}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.4000000000000001e-98 or 155000 < a

    1. Initial program 99.2%

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

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

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

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

    if -6.4000000000000001e-98 < a < -5.49999999999999953e-283 or 4.7000000000000001e-42 < a < 155000

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

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

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

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

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

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    10. Taylor expanded in x around inf 30.7%

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

    if -5.49999999999999953e-283 < a < 4.19999999999999982e-145

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

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

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

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

    if 4.19999999999999982e-145 < a < 4.7000000000000001e-42

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.4 \cdot 10^{-98}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-283}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-145}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-42}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 155000:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 12: 50.1% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.46 \cdot 10^{-178}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

\mathbf{elif}\;a \leq 0.00034:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2e-100 or 3.4e-4 < a

    1. Initial program 99.2%

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

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

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

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

    if -2e-100 < a < -4.1e-285

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

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

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

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

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

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

      \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{60}{z}} \]
    10. Taylor expanded in x around inf 29.5%

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

    if -4.1e-285 < a < 1.46e-178

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

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

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

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

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

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

    if 1.46e-178 < a < 3.4e-4

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-285}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{-178}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 0.00034:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 13: 75.0% accurate, 1.0× speedup?

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

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+28}:\\
\;\;\;\;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 < -1.45000000000000001e32 or 3.4e28 < a

    1. Initial program 99.0%

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

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

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

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

    if -1.45000000000000001e32 < a < 3.4e28

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

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

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

Alternative 14: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{60}{z - t} \cdot \left(x - y\right) + 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(Float64(60.0 / 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

Alternative 15: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 52.3% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-149}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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


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

    1. Initial program 99.3%

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

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

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

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

    if -1.2e-101 < a < -4.1999999999999997e-202

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. 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. Taylor expanded in y around inf 58.9%

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

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

    if -4.1999999999999997e-202 < a < 9.1999999999999999e-149

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-101}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-202}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-149}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 17: 58.0% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2999999999999998e-93 or 1.7e5 < a

    1. Initial program 99.2%

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

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

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

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

    if -2.2999999999999998e-93 < a < 1.7e5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-93}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 170000:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 18: 52.4% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;a \leq 3.35 \cdot 10^{-149}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.44999999999999993e-102 or 3.3499999999999998e-149 < a

    1. Initial program 99.3%

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

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

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

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

    if -1.44999999999999993e-102 < a < 3.3499999999999998e-149

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-102}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 3.35 \cdot 10^{-149}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 19: 50.8% accurate, 4.3× speedup?

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

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

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023238 
(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)))