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

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

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 72.5% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-134}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2.0000000000000001e-18 or 2.00000000000000013e-63 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000009e42

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. 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.7%

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

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

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

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

    if -2.0000000000000001e-18 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999971e-107

    1. Initial program 94.6%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. clear-num69.6%

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} \]
      2. associate-/r/69.6%

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

      \[\leadsto 60 \cdot \color{blue}{\left(\frac{1}{z - t} \cdot \left(x - y\right)\right)} \]
    8. Taylor expanded in x around 0 69.9%

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + 60 \cdot \frac{x}{z - t}} \]
    9. Step-by-step derivation
      1. +-commutative69.9%

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

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

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} + -60 \cdot \frac{y}{z - t} \]
      4. *-commutative69.9%

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

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

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

        \[\leadsto x \cdot \frac{60}{z - t} + \frac{\color{blue}{-60 \cdot y}}{z - t} \]
      8. *-commutative64.8%

        \[\leadsto x \cdot \frac{60}{z - t} + \frac{-\color{blue}{y \cdot 60}}{z - t} \]
      9. distribute-lft-neg-in64.8%

        \[\leadsto x \cdot \frac{60}{z - t} + \frac{\color{blue}{\left(-y\right) \cdot 60}}{z - t} \]
      10. associate-*r/70.0%

        \[\leadsto x \cdot \frac{60}{z - t} + \color{blue}{\left(-y\right) \cdot \frac{60}{z - t}} \]
      11. distribute-rgt-out70.0%

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot \left(x + \left(-y\right)\right)} \]
      12. sub-neg70.0%

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

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

    if -4.99999999999999971e-107 < (*.f64 a #s(literal 120 binary64)) < -2.00000000000000008e-134 or 4.99999999999999971e-107 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000013e-63

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -2.00000000000000008e-134 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999971e-107

    1. Initial program 99.7%

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

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

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

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

    if 2.00000000000000009e42 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 98.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-107}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-134}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-107}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-63}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+42}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-107}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-90}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \cdot 120 \leq 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot 120 \leq 0.002:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Add Preprocessing
    3. 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.7%

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

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

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

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

    if -2.0000000000000001e-18 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999971e-107 or 1.99999999999999999e-90 < (*.f64 a #s(literal 120 binary64)) < 1e-61 or 2e-3 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000001e29

    1. Initial program 98.9%

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

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

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

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

    if 4.99999999999999971e-107 < (*.f64 a #s(literal 120 binary64)) < 1.99999999999999999e-90 or 5.0000000000000001e29 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 98.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-18}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-107}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-90}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-61}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \cdot 120 \leq 0.002:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+29}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.29999999999999999e87 or 1.69999999999999993e137 < y

    1. Initial program 97.3%

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

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

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

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

    if -1.29999999999999999e87 < y < 3.5000000000000002e39 or 1.24999999999999995e87 < y < 1.69999999999999993e137

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 3.5000000000000002e39 < y < 1.24999999999999995e87

    1. Initial program 99.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+87}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+39}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+87}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+137}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+66} \lor \neg \left(a \leq 4.8 \cdot 10^{-108} \lor \neg \left(a \leq 1.5 \cdot 10^{-92}\right) \land a \leq 1.96 \cdot 10^{+28}\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 -3.7e+66)
         (not (or (<= a 4.8e-108) (and (not (<= a 1.5e-92)) (<= a 1.96e+28)))))
   (* 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 <= -3.7e+66) || !((a <= 4.8e-108) || (!(a <= 1.5e-92) && (a <= 1.96e+28)))) {
		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 <= (-3.7d+66)) .or. (.not. (a <= 4.8d-108) .or. (.not. (a <= 1.5d-92)) .and. (a <= 1.96d+28))) 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 <= -3.7e+66) || !((a <= 4.8e-108) || (!(a <= 1.5e-92) && (a <= 1.96e+28)))) {
		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 <= -3.7e+66) or not ((a <= 4.8e-108) or (not (a <= 1.5e-92) and (a <= 1.96e+28))):
		tmp = a * 120.0
	else:
		tmp = 60.0 * ((x - y) / (z - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -3.7e+66) || !((a <= 4.8e-108) || (!(a <= 1.5e-92) && (a <= 1.96e+28))))
		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 <= -3.7e+66) || ~(((a <= 4.8e-108) || (~((a <= 1.5e-92)) && (a <= 1.96e+28)))))
		tmp = a * 120.0;
	else
		tmp = 60.0 * ((x - y) / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.7e+66], N[Not[Or[LessEqual[a, 4.8e-108], And[N[Not[LessEqual[a, 1.5e-92]], $MachinePrecision], LessEqual[a, 1.96e+28]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+66} \lor \neg \left(a \leq 4.8 \cdot 10^{-108} \lor \neg \left(a \leq 1.5 \cdot 10^{-92}\right) \land a \leq 1.96 \cdot 10^{+28}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7e66 or 4.80000000000000034e-108 < a < 1.50000000000000007e-92 or 1.96000000000000006e28 < a

    1. Initial program 98.9%

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

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

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

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

    if -3.7e66 < a < 4.80000000000000034e-108 or 1.50000000000000007e-92 < a < 1.96000000000000006e28

    1. Initial program 99.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+66} \lor \neg \left(a \leq 4.8 \cdot 10^{-108} \lor \neg \left(a \leq 1.5 \cdot 10^{-92}\right) \land a \leq 1.96 \cdot 10^{+28}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 54.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-81}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 6 \cdot 10^{+52}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.4999999999999992e87 or 6e52 < y

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

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

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

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

    if -9.4999999999999992e87 < y < -2.0999999999999999e-81 or -1.01999999999999996e-169 < y < 6e52

    1. Initial program 99.9%

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

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

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

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

    if -2.0999999999999999e-81 < y < -1.01999999999999996e-169

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+87}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-81}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-169}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+52}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -7.5 \cdot 10^{-81}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.5000000000000002e83 or 3.50000000000000019e53 < y

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

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

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

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

    if -9.5000000000000002e83 < y < -7.50000000000000018e-81 or -1.01999999999999996e-169 < y < 3.50000000000000019e53

    1. Initial program 99.9%

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

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

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

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

    if -7.50000000000000018e-81 < y < -1.01999999999999996e-169

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+83}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-81}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-169}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 88.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+82} \lor \neg \left(y \leq 2.2 \cdot 10^{-28}\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 -2.5e+82) (not (<= y 2.2e-28)))
   (+ (* 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 <= -2.5e+82) || !(y <= 2.2e-28)) {
		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 <= (-2.5d+82)) .or. (.not. (y <= 2.2d-28))) 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 <= -2.5e+82) || !(y <= 2.2e-28)) {
		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 <= -2.5e+82) or not (y <= 2.2e-28):
		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 <= -2.5e+82) || !(y <= 2.2e-28))
		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 <= -2.5e+82) || ~((y <= 2.2e-28)))
		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, -2.5e+82], N[Not[LessEqual[y, 2.2e-28]], $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 -2.5 \cdot 10^{+82} \lor \neg \left(y \leq 2.2 \cdot 10^{-28}\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 < -2.50000000000000008e82 or 2.19999999999999996e-28 < y

    1. Initial program 98.1%

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

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

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

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

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

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

    if -2.50000000000000008e82 < y < 2.19999999999999996e-28

    1. Initial program 99.9%

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

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

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

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

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

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

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

Alternative 9: 88.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+82} \lor \neg \left(y \leq 3.3 \cdot 10^{-28}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.55000000000000016e82 or 3.3000000000000002e-28 < y

    1. Initial program 98.1%

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

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

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

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

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

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

    if -1.55000000000000016e82 < y < 3.3000000000000002e-28

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

Alternative 10: 84.5% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.59999999999999996e-14 or 1.12000000000000004e-66 < z

    1. Initial program 99.2%

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

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

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

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

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

    if -8.59999999999999996e-14 < z < 1.12000000000000004e-66

    1. Initial program 98.8%

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

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

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

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

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

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

Alternative 11: 88.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+81}:\\
\;\;\;\;y \cdot \left(120 \cdot \frac{a}{y} + \frac{60}{t - z}\right)\\

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

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


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

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000017e81 < y < 9.19999999999999965e-29

    1. Initial program 99.9%

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

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

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

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

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

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

    if 9.19999999999999965e-29 < y

    1. Initial program 99.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+81}:\\ \;\;\;\;y \cdot \left(120 \cdot \frac{a}{y} + \frac{60}{t - z}\right)\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-29}:\\ \;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 57.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+86} \lor \neg \left(y \leq 3.7 \cdot 10^{+53}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.0000000000000001e86 or 3.7e53 < y

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

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

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

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

    if -8.0000000000000001e86 < y < 3.7e53

    1. Initial program 99.9%

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

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

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

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

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

Alternative 13: 52.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+164} \lor \neg \left(y \leq 1.4 \cdot 10^{+133}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.79999999999999995e164 or 1.40000000000000008e133 < y

    1. Initial program 96.9%

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

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

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

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

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

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

    if -1.79999999999999995e164 < y < 1.40000000000000008e133

    1. Initial program 99.8%

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

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

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

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

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

Alternative 14: 52.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-251} \lor \neg \left(a \leq 2.5 \cdot 10^{-109}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.6e-251 or 2.5000000000000001e-109 < a

    1. Initial program 98.8%

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

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

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

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

    if -6.6e-251 < a < 2.5000000000000001e-109

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{-251} \lor \neg \left(a \leq 2.5 \cdot 10^{-109}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification49.1%

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

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 2024100 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

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

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