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

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\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. +-commutative99.4%

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

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

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

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

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

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

Alternative 2: 73.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-33} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-96}\right) \land a \cdot 120 \leq 5 \cdot 10^{+39}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -4.99999999999999979e27 or -4.0000000000000002e-33 < (*.f64 a 120) < -4.99999999999999995e-96 or 5.00000000000000015e39 < (*.f64 a 120)

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

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

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

    if -4.99999999999999979e27 < (*.f64 a 120) < -4.0000000000000002e-33 or -4.99999999999999995e-96 < (*.f64 a 120) < 5.00000000000000015e39

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+27}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-33} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-96}\right) \land a \cdot 120 \leq 5 \cdot 10^{+39}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 3: 74.1% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999979e27 or 5.00000000000000015e39 < (*.f64 a 120)

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

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

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

    if -4.99999999999999979e27 < (*.f64 a 120) < -4.99999999999999979e-75

    1. Initial program 99.9%

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

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

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

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

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

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

    if -4.99999999999999979e-75 < (*.f64 a 120) < 5.00000000000000015e39

    1. Initial program 99.7%

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

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

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

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

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

Alternative 4: 73.9% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999979e27 or 5.00000000000000015e39 < (*.f64 a 120)

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

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

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

    if -4.99999999999999979e27 < (*.f64 a 120) < -4.99999999999999979e-75

    1. Initial program 99.9%

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

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

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

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

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

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

    if -4.99999999999999979e-75 < (*.f64 a 120) < 5.00000000000000015e39

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 5: 89.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq -3 \cdot 10^{+55} \lor \neg \left(x \leq -3.8 \cdot 10^{+18}\right) \land x \leq 9.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\

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


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

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

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

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

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

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

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

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

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

    if -3.59999999999999981e98 < x < -3.00000000000000017e55 or -3.8e18 < x < 9.20000000000000053e98

    1. Initial program 99.2%

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

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

    if -3.00000000000000017e55 < x < -3.8e18 or 9.20000000000000053e98 < x

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+98}:\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{elif}\;x \leq -3 \cdot 10^{+55} \lor \neg \left(x \leq -3.8 \cdot 10^{+18}\right) \land x \leq 9.2 \cdot 10^{+98}:\\ \;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\ \end{array} \]

Alternative 6: 89.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq -1.28 \cdot 10^{+51} \lor \neg \left(x \leq -5.7 \cdot 10^{+18}\right) \land x \leq 7.6 \cdot 10^{+99}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}} + a \cdot 120\\

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


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

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

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

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

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

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

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

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

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

    if -3.7999999999999999e98 < x < -1.27999999999999993e51 or -5.7e18 < x < 7.6e99

    1. Initial program 99.2%

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

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

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

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

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

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

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

    if -1.27999999999999993e51 < x < -5.7e18 or 7.6e99 < x

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{+98}:\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{+51} \lor \neg \left(x \leq -5.7 \cdot 10^{+18}\right) \land x \leq 7.6 \cdot 10^{+99}:\\ \;\;\;\;\frac{60}{\frac{t - z}{y}} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\ \end{array} \]

Alternative 7: 81.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-217} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-37}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -4.00000000000000033e-217 or 2.00000000000000013e-37 < (*.f64 a 120)

    1. Initial program 99.3%

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

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

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

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

    if -4.00000000000000033e-217 < (*.f64 a 120) < 2.00000000000000013e-37

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

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

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

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

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

Alternative 8: 81.5% accurate, 0.7× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -4.00000000000000033e-217 < (*.f64 a 120) < 2.00000000000000013e-37

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

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

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

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

    if 2.00000000000000013e-37 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

Alternative 9: 81.5% accurate, 0.7× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -4.00000000000000033e-217 < (*.f64 a 120) < 2.00000000000000013e-37

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

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

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

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

    if 2.00000000000000013e-37 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.7%

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

Alternative 10: 53.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+188}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{+176}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

\mathbf{elif}\;z \leq -1.4 \cdot 10^{-207}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-19}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.00000000000000021e188 or -8.80000000000000029e176 < z < -1.39999999999999996e-207 or 1.0499999999999999e-19 < z

    1. Initial program 99.2%

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

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

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

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

    if -9.00000000000000021e188 < z < -8.80000000000000029e176

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

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

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

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

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

    if -1.39999999999999996e-207 < z < 1.0499999999999999e-19

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+188}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+176}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-207}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-19}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 11: 53.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{+176}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-207}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-19}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0000000000000001e190 or -8.80000000000000029e176 < z < -3.5999999999999997e-207 or 1.49999999999999996e-19 < z

    1. Initial program 99.2%

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

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

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

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

    if -1.0000000000000001e190 < z < -8.80000000000000029e176

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

    if -3.5999999999999997e-207 < z < 1.49999999999999996e-19

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+190}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+176}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-207}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-19}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 12: 53.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{+176}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{-208}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-19}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0000000000000001e190 or -8.80000000000000029e176 < z < -6.4999999999999998e-208 or 2.60000000000000013e-19 < z

    1. Initial program 99.2%

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

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

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

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

    if -1.0000000000000001e190 < z < -8.80000000000000029e176

    1. Initial program 99.5%

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

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

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

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

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

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

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

    if -6.4999999999999998e-208 < z < 2.60000000000000013e-19

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+190}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+176}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-208}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-19}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 13: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 14: 58.9% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.9999999999999997e-148 or 3.7000000000000003e-23 < a

    1. Initial program 99.3%

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

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

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

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

    if -9.9999999999999997e-148 < a < 3.7000000000000003e-23

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-147}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-23}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 15: 54.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-207}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-19}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e-207 or 1.0499999999999999e-19 < z

    1. Initial program 99.2%

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

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

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

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

    if -1.15e-207 < z < 1.0499999999999999e-19

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-207}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-19}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 16: 53.4% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-154}:\\
\;\;\;\;-60 \cdot \frac{-y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7500000000000001e-259 or 3.8000000000000001e-154 < a

    1. Initial program 99.4%

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

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

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

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

    if -1.7500000000000001e-259 < a < 3.8000000000000001e-154

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

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

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

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

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

      \[\leadsto -60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{t}\right)} \]
    7. Step-by-step derivation
      1. associate-*r/40.6%

        \[\leadsto -60 \cdot \color{blue}{\frac{-1 \cdot y}{t}} \]
      2. neg-mul-140.6%

        \[\leadsto -60 \cdot \frac{\color{blue}{-y}}{t} \]
    8. Simplified40.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{-259}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-154}:\\ \;\;\;\;-60 \cdot \frac{-y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 17: 51.6% accurate, 4.3× speedup?

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

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

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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