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

Percentage Accurate: 99.2% → 99.8%
Time: 11.6s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 99.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 81.3% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e-20

    1. Initial program 98.2%

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

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

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

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

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

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

    if -4.9999999999999999e-20 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1e137

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 1e137 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 96.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 a around 0 92.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      3. associate-*r/89.6%

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

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

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

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

Alternative 3: 74.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999989e37 or 5e128 < (*.f64 a 120)

    1. Initial program 98.8%

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

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

    if -4.99999999999999989e37 < (*.f64 a 120) < 1.99999999999999991e-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.7%

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

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

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

    if 1.99999999999999991e-44 < (*.f64 a 120) < 5e128

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.3% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999989e37 or 5e128 < (*.f64 a 120)

    1. Initial program 98.8%

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

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

    if -4.99999999999999989e37 < (*.f64 a 120) < 1.99999999999999991e-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.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
      3. associate-*r/81.0%

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

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

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

    if 1.99999999999999991e-44 < (*.f64 a 120) < 5e128

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.1% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999989e37 or 5e128 < (*.f64 a 120)

    1. Initial program 98.8%

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

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

    if -4.99999999999999989e37 < (*.f64 a 120) < 1.99999999999999991e-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.7%

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

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

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

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

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

    if 1.99999999999999991e-44 < (*.f64 a 120) < 5e128

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 74.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+16}:\\
\;\;\;\;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 (*.f64 a 120) < -4.99999999999999989e37 or 2e16 < (*.f64 a 120)

    1. Initial program 98.2%

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

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

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

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

    if -4.99999999999999989e37 < (*.f64 a 120) < 2e16

    1. Initial program 99.7%

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

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

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

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

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

Alternative 7: 57.2% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 6 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.22e23 or 6.00000000000000005e-51 < a

    1. Initial program 98.3%

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

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

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

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

    if -1.22e23 < a < -1.2999999999999999e-105 or 1.9000000000000001e-296 < a < 6.00000000000000005e-51

    1. Initial program 99.7%

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

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

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

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

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

    if -1.2999999999999999e-105 < a < 1.9000000000000001e-296

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.22 \cdot 10^{+23}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-105}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-296}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-51}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 8: 89.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.5999999999999995e95 or 1.8e-12 < x

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

    if -5.5999999999999995e95 < x < 1.8e-12

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

Alternative 9: 77.9% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.95e6

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.95e6 < t < 2.8000000000000001e44

    1. Initial program 99.1%

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

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

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

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

    if 2.8000000000000001e44 < t

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 78.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.75e6

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e6 < t < 5.5000000000000003e41

    1. Initial program 99.1%

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

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

        \[\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. Taylor expanded in z around inf 84.3%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{z}} \cdot \left(x - y\right)\right) \]
    5. Step-by-step derivation
      1. fma-udef84.3%

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

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

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

    if 5.5000000000000003e41 < t

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 89.5% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -2.5500000000000001e81 < x < 2.39999999999999987e-12

    1. Initial program 99.8%

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

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

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

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

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

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

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

    if 2.39999999999999987e-12 < x

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

Alternative 12: 89.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -4.39999999999999999e91 < x < 2.39999999999999987e-12

    1. Initial program 99.8%

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

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

    if 2.39999999999999987e-12 < x

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

Alternative 13: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 14: 56.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+23} \lor \neg \left(a \leq 2.3 \cdot 10^{-51}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.45000000000000006e23 or 2.30000000000000002e-51 < a

    1. Initial program 98.3%

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

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

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

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

    if -1.45000000000000006e23 < a < 2.30000000000000002e-51

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 15: 56.7% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.40000000000000025e23 or 9.2e13 < a

    1. Initial program 98.2%

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

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

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

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

    if -7.40000000000000025e23 < a < 9.2e13

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 16: 51.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+198} \lor \neg \left(y \leq 3.5 \cdot 10^{+135}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.15e198 or 3.5000000000000003e135 < y

    1. Initial program 97.9%

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

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

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

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

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

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

    if -1.15e198 < y < 3.5000000000000003e135

    1. Initial program 99.4%

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

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

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

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

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

Alternative 17: 51.1% 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.1%

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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