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

Percentage Accurate: 99.3% → 99.3%
Time: 11.7s
Alternatives: 13
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 13 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.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}
Derivation
  1. Initial program 99.8%

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

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

Alternative 2: 75.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq -165:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

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

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


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

    1. Initial program 99.8%

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

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

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

    if -3.1999999999999997e203 < z < -4.9000000000000001e157

    1. Initial program 99.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \frac{x - y}{0.016666666666666666}} + a \cdot 120 \]
    4. Step-by-step derivation
      1. clear-num98.8%

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

        \[\leadsto \color{blue}{\frac{\frac{1}{z - t}}{\frac{0.016666666666666666}{x - y}}} + a \cdot 120 \]
    5. Applied egg-rr99.0%

      \[\leadsto \color{blue}{\frac{\frac{1}{z - t}}{\frac{0.016666666666666666}{x - y}}} + a \cdot 120 \]
    6. Taylor expanded in a around 0 87.0%

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

    if -4.9000000000000001e157 < z < -165

    1. Initial program 99.9%

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

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

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

    if -165 < z < 3.29999999999999982e-78

    1. Initial program 99.8%

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

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

    if 3.29999999999999982e-78 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z}{x - y}}} + a \cdot 120 \]
    4. Applied egg-rr89.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+203}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{+157}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq -165:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-78}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\ \end{array} \]

Alternative 3: 73.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-54} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-56}\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 120.0) -5e-54) (not (<= (* a 120.0) 5e-56)))
   (* 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) <= -5e-54) || !((a * 120.0) <= 5e-56)) {
		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 * 120.0d0) <= (-5d-54)) .or. (.not. ((a * 120.0d0) <= 5d-56))) 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 * 120.0) <= -5e-54) || !((a * 120.0) <= 5e-56)) {
		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 * 120.0) <= -5e-54) or not ((a * 120.0) <= 5e-56):
		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 ((Float64(a * 120.0) <= -5e-54) || !(Float64(a * 120.0) <= 5e-56))
		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 * 120.0) <= -5e-54) || ~(((a * 120.0) <= 5e-56)))
		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[N[(a * 120.0), $MachinePrecision], -5e-54], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-56]], $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 \cdot 120 \leq -5 \cdot 10^{-54} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-56}\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 (*.f64 a 120) < -5.00000000000000015e-54 or 4.99999999999999997e-56 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

    if -5.00000000000000015e-54 < (*.f64 a 120) < 4.99999999999999997e-56

    1. Initial program 99.7%

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

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

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

        \[\leadsto \frac{x - y}{\color{blue}{\left(z - t\right) \cdot \frac{1}{60}}} + a \cdot 120 \]
      4. *-un-lft-identity99.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{z - t}}{\frac{0.016666666666666666}{x - y}}} + a \cdot 120 \]
    6. Taylor expanded in a around 0 81.6%

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

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

Alternative 4: 83.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+119} \lor \neg \left(y \leq 2.05 \cdot 10^{+152}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.2000000000000003e119 or 2.0499999999999999e152 < y

    1. Initial program 99.8%

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

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

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

        \[\leadsto \frac{x - y}{\color{blue}{\left(z - t\right) \cdot \frac{1}{60}}} + a \cdot 120 \]
      4. *-un-lft-identity99.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{z - t}}{\frac{0.016666666666666666}{x - y}}} + a \cdot 120 \]
    6. Taylor expanded in a around 0 78.4%

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

    if -9.2000000000000003e119 < y < 2.0499999999999999e152

    1. Initial program 99.8%

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

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

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

Alternative 5: 83.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-63} \lor \neg \left(t \leq 9.2 \cdot 10^{+14}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2999999999999999e-63 or 9.2e14 < t

    1. Initial program 99.9%

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

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

    if -4.2999999999999999e-63 < t < 9.2e14

    1. Initial program 99.8%

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

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

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

Alternative 6: 88.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+118} \lor \neg \left(y \leq 1.7 \cdot 10^{+156}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.49999999999999974e118 or 1.7e156 < y

    1. Initial program 99.8%

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

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

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

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

    if -9.49999999999999974e118 < y < 1.7e156

    1. Initial program 99.8%

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

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

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

Alternative 7: 88.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+117} \lor \neg \left(y \leq 1.7 \cdot 10^{+156}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.59999999999999996e117 or 1.7e156 < y

    1. Initial program 99.8%

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

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

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

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

    if -8.59999999999999996e117 < y < 1.7e156

    1. Initial program 99.8%

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

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

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

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

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

Alternative 8: 83.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-63}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\

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

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


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

    1. Initial program 99.9%

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

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

    if -2.8000000000000002e-63 < t < 4.6e14

    1. Initial program 99.8%

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

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

    if 4.6e14 < t

    1. Initial program 99.8%

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

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

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

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

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

Alternative 9: 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.8%

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

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

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

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

Alternative 10: 51.2% accurate, 1.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(y \cdot -60\right) \cdot \frac{1}{z}\\


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

    1. Initial program 99.8%

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

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

    if 1.60000000000000001e156 < y

    1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
      2. clear-num46.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{-60 \cdot y}}} \]
    5. Applied egg-rr46.2%

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

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \left(-60 \cdot y\right)} \]
    7. Simplified46.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.6 \cdot 10^{+156}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot -60\right) \cdot \frac{1}{z}\\ \end{array} \]

Alternative 11: 51.2% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

    if 2.8499999999999998e155 < y

    1. Initial program 99.8%

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

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

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

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

Alternative 12: 51.2% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 99.8%

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

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

    if 1.52e156 < y

    1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
    5. Applied egg-rr46.3%

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

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

Alternative 13: 50.8% accurate, 4.3× speedup?

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.7% 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 2023308 
(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)))