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

Percentage Accurate: 99.3% → 99.8%
Time: 13.6s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num99.7%

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

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

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

Alternative 2: 72.8% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4e46 or 2e27 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.0%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.3%

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

    if -4e46 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000013e-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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      2. fma-define99.6%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 78.7%

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

    if 2.00000000000000013e-138 < (*.f64 a #s(literal 120 binary64)) < 2e27

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg79.4%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-179.4%

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

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

        \[\leadsto \color{blue}{60} \cdot \frac{y}{-\left(z - t\right)} + a \cdot 120 \]
      6. sub-neg79.4%

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in79.4%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg79.4%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg79.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+46}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-138}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+27}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.75000000000000027e26 or 5.7999999999999996e-16 < z

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg87.0%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-187.0%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac87.0%

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

        \[\leadsto \color{blue}{60} \cdot \frac{y}{-\left(z - t\right)} + a \cdot 120 \]
      6. sub-neg87.0%

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in87.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg87.0%

        \[\leadsto 60 \cdot \frac{y}{\left(-z\right) + \color{blue}{t}} + a \cdot 120 \]
      9. +-commutative87.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg87.0%

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

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

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

    if -4.75000000000000027e26 < z < -2.70000000000000016e-100 or 1.00000000000000005e-128 < z < 5.7999999999999996e-16

    1. Initial program 97.8%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 75.6%

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

    if -2.70000000000000016e-100 < z < 1.00000000000000005e-128

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.75 \cdot 10^{+26}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-100}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 10^{-128}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-16}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.7000000000000001e26 or 5.49999999999999964e-16 < z

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg87.0%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-187.0%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac87.0%

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

        \[\leadsto \color{blue}{60} \cdot \frac{y}{-\left(z - t\right)} + a \cdot 120 \]
      6. sub-neg87.0%

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in87.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg87.0%

        \[\leadsto 60 \cdot \frac{y}{\left(-z\right) + \color{blue}{t}} + a \cdot 120 \]
      9. +-commutative87.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg87.0%

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

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

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

    if -1.7000000000000001e26 < z < -2.00000000000000007e-97 or 3.9999999999999999e-132 < z < 5.49999999999999964e-16

    1. Initial program 97.8%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 75.6%

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

    if -2.00000000000000007e-97 < z < 3.9999999999999999e-132

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+26}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-97}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-132}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-16}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 88.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1000000000000001e85 or 1.19999999999999992e-62 < y

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg86.7%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-186.7%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac86.7%

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

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg86.7%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg86.7%

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

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

    if -2.1000000000000001e85 < y < 1.19999999999999992e-62

    1. Initial program 99.1%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+85} \lor \neg \left(y \leq 1.2 \cdot 10^{-62}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1000000000000001e85 or 1.19999999999999992e-62 < y

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg86.7%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-186.7%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac86.7%

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

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg86.7%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg86.7%

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

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

    if -2.1000000000000001e85 < y < 1.19999999999999992e-62

    1. Initial program 99.1%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+85} \lor \neg \left(y \leq 1.2 \cdot 10^{-62}\right):\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+223} \lor \neg \left(x \leq 5 \cdot 10^{+114}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.4000000000000003e223 or 5.0000000000000001e114 < x

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 78.8%

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

    if -6.4000000000000003e223 < x < 5.0000000000000001e114

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg88.0%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-188.0%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac88.0%

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

        \[\leadsto \color{blue}{60} \cdot \frac{y}{-\left(z - t\right)} + a \cdot 120 \]
      6. sub-neg88.0%

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in88.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg88.0%

        \[\leadsto 60 \cdot \frac{y}{\left(-z\right) + \color{blue}{t}} + a \cdot 120 \]
      9. +-commutative88.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg88.0%

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

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

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

Alternative 8: 88.6% accurate, 0.6× speedup?

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

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

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

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


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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg92.5%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-192.5%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac92.6%

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

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

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

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg92.6%

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

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

    if -2.1000000000000001e85 < y < 1.5000000000000001e-62

    1. Initial program 99.1%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

    if 1.5000000000000001e-62 < y

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+85}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-62}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.70000000000000025e38 or 7.3999999999999996e-31 < a

    1. Initial program 99.1%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 75.7%

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

    if -6.70000000000000025e38 < a < 7.3999999999999996e-31

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
      2. fma-define99.6%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 74.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.7 \cdot 10^{+38} \lor \neg \left(a \leq 7.4 \cdot 10^{-31}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 58.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+89} \lor \neg \left(y \leq 1.1 \cdot 10^{+126}\right):\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.19999999999999972e89 or 1.09999999999999999e126 < y

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg88.5%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-188.5%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac88.5%

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in88.5%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg88.5%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg88.5%

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

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

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

    if -4.19999999999999972e89 < y < 1.09999999999999999e126

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 60.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+89} \lor \neg \left(y \leq 1.1 \cdot 10^{+126}\right):\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+125}:\\
\;\;\;\;a \cdot 120\\

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


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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg91.9%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-191.9%

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

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in92.1%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg92.1%

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

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

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

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

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

    if -7.49999999999999947e89 < y < 1.15000000000000006e125

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 60.0%

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

    if 1.15000000000000006e125 < y

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg85.2%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-185.2%

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

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in85.1%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg85.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot 60}{t - z}} \]
    10. Applied egg-rr55.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+89}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+125}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{60 \cdot y}{t - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 53.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.20000000000000043e-199 or 9.0000000000000001e-141 < a

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.8%

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

    if -8.20000000000000043e-199 < a < 9.0000000000000001e-141

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg57.8%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-157.8%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac57.8%

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in57.8%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg57.8%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg57.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot 60}{t - z}} \]
    10. Applied egg-rr48.9%

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
    13. Simplified32.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{-199} \lor \neg \left(a \leq 9 \cdot 10^{-141}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot -60}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1e-198 or 9.49999999999999996e-141 < a

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.8%

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

    if -1.1e-198 < a < 9.49999999999999996e-141

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.6%

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg57.8%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-157.8%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-1 \cdot \left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      4. times-frac57.8%

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in57.8%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg57.8%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{t + \left(-z\right)}} + a \cdot 120 \]
      10. sub-neg57.8%

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z}} \]
    10. Step-by-step derivation
      1. clear-num32.4%

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z}{y}}} \]
    11. Applied egg-rr32.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-198} \lor \neg \left(a \leq 9.5 \cdot 10^{-141}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 15: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 16: 50.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+90}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\

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


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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg91.9%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-191.9%

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

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in92.1%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg92.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z}{y}}} \]
    11. Applied egg-rr44.9%

      \[\leadsto \color{blue}{\frac{-60}{\frac{z}{y}}} \]
    12. Step-by-step derivation
      1. associate-/r/44.9%

        \[\leadsto \color{blue}{\frac{-60}{z} \cdot y} \]
    13. Simplified44.9%

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

    if -4.10000000000000042e90 < y

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 54.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{-60}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+90}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg91.9%

        \[\leadsto \frac{-60 \cdot y}{\color{blue}{-\left(-\left(z - t\right)\right)}} + a \cdot 120 \]
      3. neg-mul-191.9%

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

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

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

        \[\leadsto 60 \cdot \frac{y}{-\color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      7. distribute-neg-in92.1%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}} + a \cdot 120 \]
      8. remove-double-neg92.1%

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

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

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

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

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

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

    if -3.19999999999999998e90 < y

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 54.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+90}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 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.4%

    \[\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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    2. fma-define99.7%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 50.0%

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification50.0%

    \[\leadsto a \cdot 120 \]
  7. Add Preprocessing

Developer Target 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}

Reproduce

?
herbie shell --seed 2024177 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))

  (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))