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

Percentage Accurate: 99.5% → 99.8%
Time: 14.0s
Alternatives: 21
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.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. Final simplification99.8%

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

Alternative 2: 82.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -3.9999999999999998e-38 or 1.00000000000000004e-108 < (*.f64 a 120) < 4.99999999999999967e-89 or 1e21 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if -3.9999999999999998e-38 < (*.f64 a 120) < 1.00000000000000004e-108

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999967e-89 < (*.f64 a 120) < 9.9999999999999998e-13

    1. Initial program 99.7%

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

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

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

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

    if 9.9999999999999998e-13 < (*.f64 a 120) < 1e21

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

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

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

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

      \[\leadsto \frac{60}{\color{blue}{-1 \cdot \frac{z}{y}}} + a \cdot 120 \]
    6. Step-by-step derivation
      1. mul-1-neg90.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-38}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-108}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-89}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-12}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{+21}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{-z}{y}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]

Alternative 3: 73.5% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a 120) < -3.9999999999999998e-38

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -3.9999999999999998e-38 < (*.f64 a 120) < 9.9999999999999998e-13

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

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

    if 9.9999999999999998e-13 < (*.f64 a 120) < 1.00000000000000007e70

    1. Initial program 99.9%

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

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

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

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

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

    if 1.00000000000000007e70 < (*.f64 a 120) < 4.9999999999999997e165

    1. Initial program 99.9%

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

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

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

      \[\leadsto \frac{60}{\color{blue}{-1 \cdot \frac{t}{x - y}}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. neg-mul-181.4%

        \[\leadsto \frac{60}{\color{blue}{-\frac{t}{x - y}}} + a \cdot 120 \]
      2. distribute-neg-frac81.4%

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

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

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

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

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

    if 4.9999999999999997e165 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 4: 73.5% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a 120) < -3.9999999999999998e-38

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -3.9999999999999998e-38 < (*.f64 a 120) < 9.9999999999999998e-13

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999998e-13 < (*.f64 a 120) < 1.00000000000000007e70

    1. Initial program 99.9%

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

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

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

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

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

    if 1.00000000000000007e70 < (*.f64 a 120) < 4.9999999999999997e165

    1. Initial program 99.9%

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

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

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

      \[\leadsto \frac{60}{\color{blue}{-1 \cdot \frac{t}{x - y}}} + a \cdot 120 \]
    5. Step-by-step derivation
      1. neg-mul-181.4%

        \[\leadsto \frac{60}{\color{blue}{-\frac{t}{x - y}}} + a \cdot 120 \]
      2. distribute-neg-frac81.4%

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

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

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

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

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

    if 4.9999999999999997e165 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 5: 75.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-38} \lor \neg \left(a \cdot 120 \leq 10^{-12}\right):\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 99.9%

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

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

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

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

    if -3.9999999999999998e-38 < (*.f64 a 120) < 9.9999999999999998e-13

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

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

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

Alternative 6: 75.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-38}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-12}:\\ \;\;\;\;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 120.0) -4e-38)
   (+ (* a 120.0) (/ 60.0 (/ z x)))
   (if (<= (* a 120.0) 1e-12) (* 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 * 120.0) <= -4e-38) {
		tmp = (a * 120.0) + (60.0 / (z / x));
	} else if ((a * 120.0) <= 1e-12) {
		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 * 120.0d0) <= (-4d-38)) then
        tmp = (a * 120.0d0) + (60.0d0 / (z / x))
    else if ((a * 120.0d0) <= 1d-12) 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 * 120.0) <= -4e-38) {
		tmp = (a * 120.0) + (60.0 / (z / x));
	} else if ((a * 120.0) <= 1e-12) {
		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 * 120.0) <= -4e-38:
		tmp = (a * 120.0) + (60.0 / (z / x))
	elif (a * 120.0) <= 1e-12:
		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 (Float64(a * 120.0) <= -4e-38)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x)));
	elseif (Float64(a * 120.0) <= 1e-12)
		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 * 120.0) <= -4e-38)
		tmp = (a * 120.0) + (60.0 / (z / x));
	elseif ((a * 120.0) <= 1e-12)
		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[N[(a * 120.0), $MachinePrecision], -4e-38], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-12], 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 \cdot 120 \leq -4 \cdot 10^{-38}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\

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

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


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

    1. Initial program 100.0%

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

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

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

    if -3.9999999999999998e-38 < (*.f64 a 120) < 9.9999999999999998e-13

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

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

    if 9.9999999999999998e-13 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

Alternative 7: 75.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-38}:\\ \;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-12}:\\ \;\;\;\;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 120.0) -4e-38)
   (+ (* a 120.0) (/ (* 60.0 x) z))
   (if (<= (* a 120.0) 1e-12) (* 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 * 120.0) <= -4e-38) {
		tmp = (a * 120.0) + ((60.0 * x) / z);
	} else if ((a * 120.0) <= 1e-12) {
		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 * 120.0d0) <= (-4d-38)) then
        tmp = (a * 120.0d0) + ((60.0d0 * x) / z)
    else if ((a * 120.0d0) <= 1d-12) 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 * 120.0) <= -4e-38) {
		tmp = (a * 120.0) + ((60.0 * x) / z);
	} else if ((a * 120.0) <= 1e-12) {
		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 * 120.0) <= -4e-38:
		tmp = (a * 120.0) + ((60.0 * x) / z)
	elif (a * 120.0) <= 1e-12:
		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 (Float64(a * 120.0) <= -4e-38)
		tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / z));
	elseif (Float64(a * 120.0) <= 1e-12)
		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 * 120.0) <= -4e-38)
		tmp = (a * 120.0) + ((60.0 * x) / z);
	elseif ((a * 120.0) <= 1e-12)
		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[N[(a * 120.0), $MachinePrecision], -4e-38], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-12], 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 \cdot 120 \leq -4 \cdot 10^{-38}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -3.9999999999999998e-38 < (*.f64 a 120) < 9.9999999999999998e-13

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

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

    if 9.9999999999999998e-13 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

Alternative 8: 59.5% accurate, 0.9× speedup?

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

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

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

    if -3.3999999999999998e-41 < a < -2.0500000000000001e-140

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z - t}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg65.7%

        \[\leadsto 60 \cdot \color{blue}{\left(-\frac{y}{z - t}\right)} \]
      2. distribute-neg-frac65.7%

        \[\leadsto 60 \cdot \color{blue}{\frac{-y}{z - t}} \]
    7. Simplified65.7%

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

    if -2.0500000000000001e-140 < a < -2.55000000000000005e-188

    1. Initial program 99.6%

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

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

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{x - y}{t}\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg73.6%

        \[\leadsto 60 \cdot \color{blue}{\left(-\frac{x - y}{t}\right)} \]
      2. distribute-neg-frac73.6%

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

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

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

    if -2.55000000000000005e-188 < a < 3.4e-15

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-41}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-140}:\\ \;\;\;\;60 \cdot \frac{-y}{z - t}\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-188}:\\ \;\;\;\;60 \cdot \frac{y - x}{t}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-15}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 9: 85.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00062 \lor \neg \left(t \leq 2.8 \cdot 10^{-8}\right):\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.2e-4 or 2.7999999999999999e-8 < t

    1. Initial program 99.8%

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

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

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

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

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

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

    if -6.2e-4 < t < 2.7999999999999999e-8

    1. Initial program 99.9%

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

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

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

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

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

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

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

Alternative 10: 85.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.29999999999999992e-5 or 1.35000000000000001e-8 < t

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.29999999999999992e-5 < t < 1.35000000000000001e-8

    1. Initial program 99.9%

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

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

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

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

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

Alternative 11: 88.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.99999999999999971e75 or 4.29999999999999998e117 < 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 90.9%

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

    if -3.99999999999999971e75 < y < 4.29999999999999998e117

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 12: 88.8% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3999999999999999e76 or 1.09999999999999993e118 < 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 90.9%

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

    if -1.3999999999999999e76 < y < 1.09999999999999993e118

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

Alternative 13: 88.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+75}:\\
\;\;\;\;a \cdot 120 + \frac{1}{z - t} \cdot \left(y \cdot -60\right)\\

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

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


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

    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.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-/l*99.9%

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

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

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

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

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

    if -4.5000000000000004e75 < y < 4.29999999999999998e117

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 4.29999999999999998e117 < 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.0%

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

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

Alternative 14: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 15: 52.5% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.6999999999999999e-61 or 1.6000000000000001e-172 < a

    1. Initial program 99.8%

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

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

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

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

    if -1.6999999999999999e-61 < a < -1.65e-187

    1. Initial program 99.7%

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

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

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

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

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

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

    if -1.65e-187 < a < 1.6000000000000001e-172

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-187}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-172}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 16: 52.6% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.6999999999999999e-61 or 3.40000000000000022e-168 < a

    1. Initial program 99.8%

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

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

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

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

    if -1.6999999999999999e-61 < a < -5.7999999999999999e-191

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{t}{x}}} \]
    8. Simplified30.7%

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

    if -5.7999999999999999e-191 < a < 3.40000000000000022e-168

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-191}:\\ \;\;\;\;\frac{-60}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-168}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 17: 52.4% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.6999999999999997e-52 or 1.1000000000000001e-171 < a

    1. Initial program 99.8%

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

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

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

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

    if -3.6999999999999997e-52 < a < -1.5999999999999999e-187

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{t}{x}}} \]
    8. Simplified30.7%

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

    if -1.5999999999999999e-187 < a < 1.1000000000000001e-171

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z}{x}}} \]
    8. Simplified31.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{-52}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-187}:\\ \;\;\;\;\frac{-60}{\frac{t}{x}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-171}:\\ \;\;\;\;\frac{60}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 18: 58.3% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.69999999999999999e-64 or 1.55e-159 < a

    1. Initial program 99.8%

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

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

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

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

    if -3.69999999999999999e-64 < a < 1.55e-159

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{-64}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-159}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 19: 59.3% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.5e-52 or 3.6000000000000001e-15 < a

    1. Initial program 99.9%

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

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

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

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

    if -5.5e-52 < a < 3.6000000000000001e-15

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

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

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

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

Alternative 20: 52.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-179}:\\ \;\;\;\;-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.7e-61)
   (* a 120.0)
   (if (<= a 2.6e-179) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.7e-61) {
		tmp = a * 120.0;
	} else if (a <= 2.6e-179) {
		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.7d-61)) then
        tmp = a * 120.0d0
    else if (a <= 2.6d-179) 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.7e-61) {
		tmp = a * 120.0;
	} else if (a <= 2.6e-179) {
		tmp = -60.0 * (x / t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.7e-61:
		tmp = a * 120.0
	elif a <= 2.6e-179:
		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.7e-61)
		tmp = Float64(a * 120.0);
	elseif (a <= 2.6e-179)
		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.7e-61)
		tmp = a * 120.0;
	elseif (a <= 2.6e-179)
		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.7e-61], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.6e-179], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-179}:\\
\;\;\;\;-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.6999999999999999e-61 or 2.60000000000000005e-179 < a

    1. Initial program 99.8%

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

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

    if -1.6999999999999999e-61 < a < 2.60000000000000005e-179

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

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

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

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

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

Alternative 21: 51.0% accurate, 4.3× speedup?

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

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

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

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

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

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

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