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

Percentage Accurate: 99.4% → 99.8%
Time: 12.3s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
  4. Step-by-step derivation
    1. *-commutative99.8%

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

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

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

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

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

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

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

Alternative 2: 58.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot 60}{z - t}\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{-105}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.16 \cdot 10^{-290}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-288}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-223}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-122}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* x 60.0) (- z t))))
   (if (<= a -6.5e-105)
     (* a 120.0)
     (if (<= a -4.5e-252)
       t_1
       (if (<= a -1.16e-290)
         (/ -60.0 (/ (- z t) y))
         (if (<= a 7.6e-288)
           t_1
           (if (<= a 3.1e-223)
             (* 60.0 (/ (- x y) z))
             (if (<= a 2.7e-122) (/ (* (- x y) -60.0) t) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * 60.0) / (z - t);
	double tmp;
	if (a <= -6.5e-105) {
		tmp = a * 120.0;
	} else if (a <= -4.5e-252) {
		tmp = t_1;
	} else if (a <= -1.16e-290) {
		tmp = -60.0 / ((z - t) / y);
	} else if (a <= 7.6e-288) {
		tmp = t_1;
	} else if (a <= 3.1e-223) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 2.7e-122) {
		tmp = ((x - y) * -60.0) / 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) :: t_1
    real(8) :: tmp
    t_1 = (x * 60.0d0) / (z - t)
    if (a <= (-6.5d-105)) then
        tmp = a * 120.0d0
    else if (a <= (-4.5d-252)) then
        tmp = t_1
    else if (a <= (-1.16d-290)) then
        tmp = (-60.0d0) / ((z - t) / y)
    else if (a <= 7.6d-288) then
        tmp = t_1
    else if (a <= 3.1d-223) then
        tmp = 60.0d0 * ((x - y) / z)
    else if (a <= 2.7d-122) then
        tmp = ((x - y) * (-60.0d0)) / 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 t_1 = (x * 60.0) / (z - t);
	double tmp;
	if (a <= -6.5e-105) {
		tmp = a * 120.0;
	} else if (a <= -4.5e-252) {
		tmp = t_1;
	} else if (a <= -1.16e-290) {
		tmp = -60.0 / ((z - t) / y);
	} else if (a <= 7.6e-288) {
		tmp = t_1;
	} else if (a <= 3.1e-223) {
		tmp = 60.0 * ((x - y) / z);
	} else if (a <= 2.7e-122) {
		tmp = ((x - y) * -60.0) / t;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (x * 60.0) / (z - t)
	tmp = 0
	if a <= -6.5e-105:
		tmp = a * 120.0
	elif a <= -4.5e-252:
		tmp = t_1
	elif a <= -1.16e-290:
		tmp = -60.0 / ((z - t) / y)
	elif a <= 7.6e-288:
		tmp = t_1
	elif a <= 3.1e-223:
		tmp = 60.0 * ((x - y) / z)
	elif a <= 2.7e-122:
		tmp = ((x - y) * -60.0) / t
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * 60.0) / Float64(z - t))
	tmp = 0.0
	if (a <= -6.5e-105)
		tmp = Float64(a * 120.0);
	elseif (a <= -4.5e-252)
		tmp = t_1;
	elseif (a <= -1.16e-290)
		tmp = Float64(-60.0 / Float64(Float64(z - t) / y));
	elseif (a <= 7.6e-288)
		tmp = t_1;
	elseif (a <= 3.1e-223)
		tmp = Float64(60.0 * Float64(Float64(x - y) / z));
	elseif (a <= 2.7e-122)
		tmp = Float64(Float64(Float64(x - y) * -60.0) / t);
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x * 60.0) / (z - t);
	tmp = 0.0;
	if (a <= -6.5e-105)
		tmp = a * 120.0;
	elseif (a <= -4.5e-252)
		tmp = t_1;
	elseif (a <= -1.16e-290)
		tmp = -60.0 / ((z - t) / y);
	elseif (a <= 7.6e-288)
		tmp = t_1;
	elseif (a <= 3.1e-223)
		tmp = 60.0 * ((x - y) / z);
	elseif (a <= 2.7e-122)
		tmp = ((x - y) * -60.0) / t;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e-105], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.5e-252], t$95$1, If[LessEqual[a, -1.16e-290], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e-288], t$95$1, If[LessEqual[a, 3.1e-223], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-122], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 7.6 \cdot 10^{-288}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{-122}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6.50000000000000006e-105 or 2.70000000000000009e-122 < 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.8%

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

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

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

    if -6.50000000000000006e-105 < a < -4.5000000000000002e-252 or -1.16000000000000001e-290 < a < 7.5999999999999996e-288

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{x - y}{\frac{z - t}{60}}}\right) \]
      4. div-inv99.6%

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

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

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

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

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

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

    if -4.5000000000000002e-252 < a < -1.16000000000000001e-290

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    10. Simplified88.0%

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

    if 7.5999999999999996e-288 < a < 3.10000000000000018e-223

    1. Initial program 99.9%

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

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

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

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

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

    if 3.10000000000000018e-223 < a < 2.70000000000000009e-122

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{-105}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-252}:\\ \;\;\;\;\frac{x \cdot 60}{z - t}\\ \mathbf{elif}\;a \leq -1.16 \cdot 10^{-290}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-288}:\\ \;\;\;\;\frac{x \cdot 60}{z - t}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-223}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-122}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 3: 58.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot 60}{z - t}\\ \mathbf{if}\;a \leq -8.2 \cdot 10^{-105}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-290}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-288}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.9 \cdot 10^{-224}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-126}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* x 60.0) (- z t))))
   (if (<= a -8.2e-105)
     (* a 120.0)
     (if (<= a -1.05e-253)
       t_1
       (if (<= a -1.25e-290)
         (/ -60.0 (/ (- z t) y))
         (if (<= a 4e-288)
           t_1
           (if (<= a 5.9e-224)
             (/ (* (- x y) 60.0) z)
             (if (<= a 7.5e-126) (/ (* (- x y) -60.0) t) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * 60.0) / (z - t);
	double tmp;
	if (a <= -8.2e-105) {
		tmp = a * 120.0;
	} else if (a <= -1.05e-253) {
		tmp = t_1;
	} else if (a <= -1.25e-290) {
		tmp = -60.0 / ((z - t) / y);
	} else if (a <= 4e-288) {
		tmp = t_1;
	} else if (a <= 5.9e-224) {
		tmp = ((x - y) * 60.0) / z;
	} else if (a <= 7.5e-126) {
		tmp = ((x - y) * -60.0) / 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) :: t_1
    real(8) :: tmp
    t_1 = (x * 60.0d0) / (z - t)
    if (a <= (-8.2d-105)) then
        tmp = a * 120.0d0
    else if (a <= (-1.05d-253)) then
        tmp = t_1
    else if (a <= (-1.25d-290)) then
        tmp = (-60.0d0) / ((z - t) / y)
    else if (a <= 4d-288) then
        tmp = t_1
    else if (a <= 5.9d-224) then
        tmp = ((x - y) * 60.0d0) / z
    else if (a <= 7.5d-126) then
        tmp = ((x - y) * (-60.0d0)) / 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 t_1 = (x * 60.0) / (z - t);
	double tmp;
	if (a <= -8.2e-105) {
		tmp = a * 120.0;
	} else if (a <= -1.05e-253) {
		tmp = t_1;
	} else if (a <= -1.25e-290) {
		tmp = -60.0 / ((z - t) / y);
	} else if (a <= 4e-288) {
		tmp = t_1;
	} else if (a <= 5.9e-224) {
		tmp = ((x - y) * 60.0) / z;
	} else if (a <= 7.5e-126) {
		tmp = ((x - y) * -60.0) / t;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (x * 60.0) / (z - t)
	tmp = 0
	if a <= -8.2e-105:
		tmp = a * 120.0
	elif a <= -1.05e-253:
		tmp = t_1
	elif a <= -1.25e-290:
		tmp = -60.0 / ((z - t) / y)
	elif a <= 4e-288:
		tmp = t_1
	elif a <= 5.9e-224:
		tmp = ((x - y) * 60.0) / z
	elif a <= 7.5e-126:
		tmp = ((x - y) * -60.0) / t
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * 60.0) / Float64(z - t))
	tmp = 0.0
	if (a <= -8.2e-105)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.05e-253)
		tmp = t_1;
	elseif (a <= -1.25e-290)
		tmp = Float64(-60.0 / Float64(Float64(z - t) / y));
	elseif (a <= 4e-288)
		tmp = t_1;
	elseif (a <= 5.9e-224)
		tmp = Float64(Float64(Float64(x - y) * 60.0) / z);
	elseif (a <= 7.5e-126)
		tmp = Float64(Float64(Float64(x - y) * -60.0) / t);
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x * 60.0) / (z - t);
	tmp = 0.0;
	if (a <= -8.2e-105)
		tmp = a * 120.0;
	elseif (a <= -1.05e-253)
		tmp = t_1;
	elseif (a <= -1.25e-290)
		tmp = -60.0 / ((z - t) / y);
	elseif (a <= 4e-288)
		tmp = t_1;
	elseif (a <= 5.9e-224)
		tmp = ((x - y) * 60.0) / z;
	elseif (a <= 7.5e-126)
		tmp = ((x - y) * -60.0) / t;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.2e-105], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.05e-253], t$95$1, If[LessEqual[a, -1.25e-290], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-288], t$95$1, If[LessEqual[a, 5.9e-224], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 7.5e-126], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.05 \cdot 10^{-253}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4 \cdot 10^{-288}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5.9 \cdot 10^{-224}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-126}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -8.20000000000000061e-105 or 7.49999999999999976e-126 < 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.8%

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

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

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

    if -8.20000000000000061e-105 < a < -1.0499999999999999e-253 or -1.25e-290 < a < 4.00000000000000023e-288

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{x - y}{\frac{z - t}{60}}}\right) \]
      4. div-inv99.6%

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

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

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

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

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

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

    if -1.0499999999999999e-253 < a < -1.25e-290

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z - t}{y}}} \]
    10. Simplified88.0%

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

    if 4.00000000000000023e-288 < a < 5.9000000000000003e-224

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if 5.9000000000000003e-224 < a < 7.49999999999999976e-126

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{-105}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-253}:\\ \;\;\;\;\frac{x \cdot 60}{z - t}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-290}:\\ \;\;\;\;\frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-288}:\\ \;\;\;\;\frac{x \cdot 60}{z - t}\\ \mathbf{elif}\;a \leq 5.9 \cdot 10^{-224}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-126}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 4: 82.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -1.00000000000000005e-101 or 4.99999999999999963e-77 < (*.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.8%

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

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

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

    if -1.00000000000000005e-101 < (*.f64 a 120) < 4.99999999999999963e-77

    1. Initial program 99.7%

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

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

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

Alternative 5: 82.8% accurate, 0.7× speedup?

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

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

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

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


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

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

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

    if -1.00000000000000005e-101 < (*.f64 a 120) < 4.99999999999999963e-77

    1. Initial program 99.7%

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

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

    if 4.99999999999999963e-77 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

Alternative 6: 73.3% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.3800000000000001e41

    1. Initial program 100.0%

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

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

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

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

    if -1.3800000000000001e41 < a < 1.4e-44

    1. Initial program 99.7%

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

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

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

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

    if 1.4e-44 < a < 8.4000000000000004e105

    1. Initial program 99.9%

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

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

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

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

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

    if 8.4000000000000004e105 < a

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.38 \cdot 10^{+41}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-44}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{+105}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 7: 89.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.80000000000000013e67 or 6.8000000000000003e68 < x

    1. Initial program 99.8%

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

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

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

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

    if -7.80000000000000013e67 < x < 6.8000000000000003e68

    1. Initial program 99.8%

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

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

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

Alternative 8: 99.8% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 59.7% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8e-71 or 5.1000000000000001e-123 < 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.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 68.0%

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

    if -1.8e-71 < a < 4.9e-222

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

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

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

    if 4.9e-222 < a < 5.1000000000000001e-123

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-71}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-222}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{-123}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 10: 59.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;a \leq 2.05 \cdot 10^{-122}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.9999999999999998e-71 or 2.05e-122 < 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.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 68.0%

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

    if -1.9999999999999998e-71 < a < 1.35e-222

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

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

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

    if 1.35e-222 < a < 2.05e-122

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

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

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

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

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

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

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

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

Alternative 11: 74.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.3800000000000001e41 or 2.20000000000000012e-44 < 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 77.7%

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

    if -1.3800000000000001e41 < a < 2.20000000000000012e-44

    1. Initial program 99.7%

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

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

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

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

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

Alternative 12: 99.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 13: 99.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 14: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 51.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+186} \lor \neg \left(x \leq 3.2 \cdot 10^{+153}\right) \land x \leq 7.3 \cdot 10^{+183}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.99999999999999954e186 or 3.2000000000000001e153 < x < 7.2999999999999999e183

    1. Initial program 99.7%

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

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

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

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

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

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

    if -4.99999999999999954e186 < x < 3.2000000000000001e153 or 7.2999999999999999e183 < x

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+186} \lor \neg \left(x \leq 3.2 \cdot 10^{+153}\right) \land x \leq 7.3 \cdot 10^{+183}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 16: 51.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+198} \lor \neg \left(x \leq 8.2 \cdot 10^{+139}\right) \land x \leq 9.2 \cdot 10^{+173}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.00000000000000014e198 or 8.2000000000000004e139 < x < 9.1999999999999998e173

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{x - y}{\frac{z - t}{60}}}\right) \]
      4. div-inv99.6%

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

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

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

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

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

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

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

    if -8.00000000000000014e198 < x < 8.2000000000000004e139 or 9.1999999999999998e173 < x

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+198} \lor \neg \left(x \leq 8.2 \cdot 10^{+139}\right) \land x \leq 9.2 \cdot 10^{+173}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 17: 58.7% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.50000000000000012e-89 or 1.44999999999999987e-138 < 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.8%

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

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

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

    if -5.50000000000000012e-89 < a < 1.44999999999999987e-138

    1. Initial program 99.7%

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

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

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

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

Alternative 18: 52.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+195}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

    if -6.80000000000000021e195 < y

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

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

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

Alternative 19: 51.3% accurate, 4.3× speedup?

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

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

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

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

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