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

Percentage Accurate: 99.3% → 99.8%
Time: 17.2s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 72.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2e53 or 1e6 < (*.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 84.2%

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

    if -2e53 < (*.f64 a 120) < -1e-100

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. *-commutative69.3%

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

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

    if -1e-100 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 98.8%

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

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

    if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 3: 72.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2e53 or 1e6 < (*.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 84.2%

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

    if -2e53 < (*.f64 a 120) < -1e-100

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. *-commutative69.3%

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

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

    if -1e-100 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 98.8%

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

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

    if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 4: 72.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-152}:\\ \;\;\;\;\frac{x - y}{\frac{z - t}{60}}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;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) -2e+53)
   (* a 120.0)
   (if (<= (* a 120.0) -1e-100)
     (+ (* a 120.0) (/ x (* z 0.016666666666666666)))
     (if (<= (* a 120.0) 2e-152)
       (/ (- x y) (/ (- z t) 60.0))
       (if (<= (* a 120.0) 5e-125)
         (+ (* a 120.0) (/ (* 60.0 y) t))
         (if (<= (* a 120.0) 1000000.0)
           (* 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) <= -2e+53) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-100) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if ((a * 120.0) <= 2e-152) {
		tmp = (x - y) / ((z - t) / 60.0);
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + ((60.0 * y) / t);
	} else if ((a * 120.0) <= 1000000.0) {
		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) <= (-2d+53)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-1d-100)) then
        tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
    else if ((a * 120.0d0) <= 2d-152) then
        tmp = (x - y) / ((z - t) / 60.0d0)
    else if ((a * 120.0d0) <= 5d-125) then
        tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
    else if ((a * 120.0d0) <= 1000000.0d0) 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) <= -2e+53) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-100) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if ((a * 120.0) <= 2e-152) {
		tmp = (x - y) / ((z - t) / 60.0);
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + ((60.0 * y) / t);
	} else if ((a * 120.0) <= 1000000.0) {
		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) <= -2e+53:
		tmp = a * 120.0
	elif (a * 120.0) <= -1e-100:
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666))
	elif (a * 120.0) <= 2e-152:
		tmp = (x - y) / ((z - t) / 60.0)
	elif (a * 120.0) <= 5e-125:
		tmp = (a * 120.0) + ((60.0 * y) / t)
	elif (a * 120.0) <= 1000000.0:
		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) <= -2e+53)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -1e-100)
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666)));
	elseif (Float64(a * 120.0) <= 2e-152)
		tmp = Float64(Float64(x - y) / Float64(Float64(z - t) / 60.0));
	elseif (Float64(a * 120.0) <= 5e-125)
		tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t));
	elseif (Float64(a * 120.0) <= 1000000.0)
		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) <= -2e+53)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -1e-100)
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	elseif ((a * 120.0) <= 2e-152)
		tmp = (x - y) / ((z - t) / 60.0);
	elseif ((a * 120.0) <= 5e-125)
		tmp = (a * 120.0) + ((60.0 * y) / t);
	elseif ((a * 120.0) <= 1000000.0)
		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], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-152], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], 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 -2 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a 120) < -2e53 or 1e6 < (*.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 84.2%

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

    if -2e53 < (*.f64 a 120) < -1e-100

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. *-commutative69.3%

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

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

    if -1e-100 < (*.f64 a 120) < 2.00000000000000013e-152

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
      3. associate-*r/26.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)} - 1 \]
      4. *-commutative26.4%

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

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

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

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

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

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

    if 2.00000000000000013e-152 < (*.f64 a 120) < 4.99999999999999967e-125

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

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

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

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

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

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

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

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

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

    if 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 97.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-152}:\\ \;\;\;\;\frac{x - y}{\frac{z - t}{60}}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 75.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{+23}:\\
\;\;\;\;\frac{x - y}{\frac{z - t}{60}}\\

\mathbf{elif}\;z \leq -4.6 \cdot 10^{-23}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-58}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5 \cdot 10^{+93}:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. *-commutative88.0%

        \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    9. Simplified88.0%

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

    if -5.80000000000000034e78 < z < -9.9999999999999992e22

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
      3. associate-*r/14.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)} - 1 \]
      4. *-commutative14.0%

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

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

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

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

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

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

    if -9.9999999999999992e22 < z < -4.6000000000000002e-23 or 5.0000000000000001e93 < z

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

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

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

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

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

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

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

    if -4.6000000000000002e-23 < z < 1.50000000000000004e-58 or 1.95e8 < z < 5.0000000000000001e93

    1. Initial program 99.1%

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

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

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

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

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

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

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

    if 1.50000000000000004e-58 < z < 1.95e8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+78}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+23}:\\ \;\;\;\;\frac{x - y}{\frac{z - t}{60}}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-23}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-58}:\\ \;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;z \leq 195000000:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+93}:\\ \;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 6: 73.7% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -1.00000000000000004e-10 or 1e6 < (*.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 80.7%

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

    if -1.00000000000000004e-10 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 99.0%

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

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

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

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

    if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

Alternative 7: 57.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-116} \lor \neg \left(a \leq 1.25 \cdot 10^{-149} \lor \neg \left(a \leq 1.9 \cdot 10^{-132}\right) \land a \leq 2.2 \cdot 10^{-41}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.99999999999999968e-116 or 1.24999999999999992e-149 < a < 1.8999999999999998e-132 or 2.2e-41 < a

    1. Initial program 99.3%

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

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

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

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

    if -6.99999999999999968e-116 < a < 1.24999999999999992e-149 or 1.8999999999999998e-132 < a < 2.2e-41

    1. Initial program 99.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-116} \lor \neg \left(a \leq 1.25 \cdot 10^{-149} \lor \neg \left(a \leq 1.9 \cdot 10^{-132}\right) \land a \leq 2.2 \cdot 10^{-41}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 8: 57.0% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq 5 \cdot 10^{-131} \lor \neg \left(a \leq 2.75 \cdot 10^{-39}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.6e-118 or 1.29999999999999999e-149 < a < 5.0000000000000004e-131 or 2.75000000000000009e-39 < a

    1. Initial program 99.3%

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

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

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

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

    if -2.6e-118 < a < 1.29999999999999999e-149

    1. Initial program 99.7%

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

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

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

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

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

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

    if 5.0000000000000004e-131 < a < 2.75000000000000009e-39

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
      3. associate-*r/25.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)} - 1 \]
      4. *-commutative25.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{-118}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-149}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-131} \lor \neg \left(a \leq 2.75 \cdot 10^{-39}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 9: 57.0% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq 10^{-132} \lor \neg \left(a \leq 2.1 \cdot 10^{-40}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.9000000000000001e-112 or 1.29999999999999999e-149 < a < 9.9999999999999999e-133 or 2.10000000000000018e-40 < a

    1. Initial program 99.3%

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

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

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

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

    if -3.9000000000000001e-112 < a < 1.29999999999999999e-149

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    8. Simplified58.1%

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

    if 9.9999999999999999e-133 < a < 2.10000000000000018e-40

    1. Initial program 99.6%

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
      3. associate-*r/25.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)} - 1 \]
      4. *-commutative25.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{-112}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-149}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq 10^{-132} \lor \neg \left(a \leq 2.1 \cdot 10^{-40}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 10: 84.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-29} \lor \neg \left(t \leq 8.6 \cdot 10^{-56}\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 -4.3e-29) (not (<= t 8.6e-56)))
   (+ (* 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 <= -4.3e-29) || !(t <= 8.6e-56)) {
		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 <= (-4.3d-29)) .or. (.not. (t <= 8.6d-56))) 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 <= -4.3e-29) || !(t <= 8.6e-56)) {
		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 <= -4.3e-29) or not (t <= 8.6e-56):
		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 <= -4.3e-29) || !(t <= 8.6e-56))
		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 <= -4.3e-29) || ~((t <= 8.6e-56)))
		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, -4.3e-29], N[Not[LessEqual[t, 8.6e-56]], $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 -4.3 \cdot 10^{-29} \lor \neg \left(t \leq 8.6 \cdot 10^{-56}\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 < -4.2999999999999998e-29 or 8.6000000000000002e-56 < t

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

    if -4.2999999999999998e-29 < t < 8.6000000000000002e-56

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x - y}{\frac{z}{60}}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. div-inv85.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-29} \lor \neg \left(t \leq 8.6 \cdot 10^{-56}\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 11: 87.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.69999999999999984e75 or 2.5e175 < x

    1. Initial program 98.4%

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

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

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

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

    if -4.69999999999999984e75 < x < 2.5e175

    1. Initial program 99.8%

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

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

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

Alternative 12: 84.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-30}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -3.7000000000000003e-30 < t < 2.8499999999999999e-56

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x - y}{\frac{z}{60}}} + a \cdot 120 \]
    7. Step-by-step derivation
      1. div-inv85.5%

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

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

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

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

    if 2.8499999999999999e-56 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

Alternative 13: 74.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{-19} \lor \neg \left(a \leq 2700000\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 -6.8e-19) (not (<= a 2700000.0)))
   (* 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 <= -6.8e-19) || !(a <= 2700000.0)) {
		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 <= (-6.8d-19)) .or. (.not. (a <= 2700000.0d0))) 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 <= -6.8e-19) || !(a <= 2700000.0)) {
		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 <= -6.8e-19) or not (a <= 2700000.0):
		tmp = a * 120.0
	else:
		tmp = 60.0 * ((x - y) / (z - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -6.8e-19) || !(a <= 2700000.0))
		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 <= -6.8e-19) || ~((a <= 2700000.0)))
		tmp = a * 120.0;
	else
		tmp = 60.0 * ((x - y) / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.8e-19], N[Not[LessEqual[a, 2700000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-19} \lor \neg \left(a \leq 2700000\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8000000000000004e-19 or 2.7e6 < 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 80.7%

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

    if -6.8000000000000004e-19 < a < 2.7e6

    1. Initial program 99.0%

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

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

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

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

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

Alternative 14: 51.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{-141} \lor \neg \left(a \leq 7.8 \cdot 10^{-108}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.60000000000000023e-141 or 7.79999999999999989e-108 < a

    1. Initial program 99.3%

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

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

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

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

    if -5.60000000000000023e-141 < a < 7.79999999999999989e-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.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 z around 0 61.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot 60}{t}} + a \cdot 120 \]
    10. Step-by-step derivation
      1. +-commutative48.1%

        \[\leadsto \color{blue}{a \cdot 120 + \frac{y \cdot 60}{t}} \]
      2. fma-def48.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{y \cdot 60}{t}\right)} \]
      3. *-commutative48.1%

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{60 \cdot y}}{t}\right) \]
      4. *-un-lft-identity48.1%

        \[\leadsto \mathsf{fma}\left(a, 120, \frac{60 \cdot y}{\color{blue}{1 \cdot t}}\right) \]
      5. times-frac48.1%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{1} \cdot \frac{y}{t}}\right) \]
      6. metadata-eval48.1%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{60} \cdot \frac{y}{t}\right) \]
    11. Applied egg-rr48.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{-141} \lor \neg \left(a \leq 7.8 \cdot 10^{-108}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 15: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 16: 51.6% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

    if 5.20000000000000004e195 < y

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z}} + a \cdot 120 \]
      2. *-commutative54.1%

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

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

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

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

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

Alternative 17: 50.7% accurate, 4.3× speedup?

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

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

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

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

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

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

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