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

Percentage Accurate: 99.3% → 99.8%
Time: 14.1s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
  4. Step-by-step derivation
    1. associate-/r/99.8%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
  5. Applied egg-rr99.8%

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

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

Alternative 2: 99.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

Alternative 3: 73.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t_2 \leq -400000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{-33}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;t_2 \leq 200000000:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+21}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+45}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_2 -400000000.0)
     t_1
     (if (<= t_2 2e-76)
       (* a 120.0)
       (if (<= t_2 4e-33)
         (/ 60.0 (/ (- z t) (- x y)))
         (if (<= t_2 200000000.0)
           (+ (* a 120.0) (* 60.0 (/ y t)))
           (if (<= t_2 5e+21)
             (+ (* a 120.0) (* 60.0 (/ x z)))
             (if (<= t_2 5e+45) (+ (* a 120.0) (* -60.0 (/ x t))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -400000000.0) {
		tmp = t_1;
	} else if (t_2 <= 2e-76) {
		tmp = a * 120.0;
	} else if (t_2 <= 4e-33) {
		tmp = 60.0 / ((z - t) / (x - y));
	} else if (t_2 <= 200000000.0) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (t_2 <= 5e+21) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if (t_2 <= 5e+45) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} 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) :: t_2
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    t_2 = (60.0d0 * (x - y)) / (z - t)
    if (t_2 <= (-400000000.0d0)) then
        tmp = t_1
    else if (t_2 <= 2d-76) then
        tmp = a * 120.0d0
    else if (t_2 <= 4d-33) then
        tmp = 60.0d0 / ((z - t) / (x - y))
    else if (t_2 <= 200000000.0d0) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if (t_2 <= 5d+21) then
        tmp = (a * 120.0d0) + (60.0d0 * (x / z))
    else if (t_2 <= 5d+45) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    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 * ((x - y) / (z - t));
	double t_2 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_2 <= -400000000.0) {
		tmp = t_1;
	} else if (t_2 <= 2e-76) {
		tmp = a * 120.0;
	} else if (t_2 <= 4e-33) {
		tmp = 60.0 / ((z - t) / (x - y));
	} else if (t_2 <= 200000000.0) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (t_2 <= 5e+21) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if (t_2 <= 5e+45) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	t_2 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if t_2 <= -400000000.0:
		tmp = t_1
	elif t_2 <= 2e-76:
		tmp = a * 120.0
	elif t_2 <= 4e-33:
		tmp = 60.0 / ((z - t) / (x - y))
	elif t_2 <= 200000000.0:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif t_2 <= 5e+21:
		tmp = (a * 120.0) + (60.0 * (x / z))
	elif t_2 <= 5e+45:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	else:
		tmp = t_1
	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(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_2 <= -400000000.0)
		tmp = t_1;
	elseif (t_2 <= 2e-76)
		tmp = Float64(a * 120.0);
	elseif (t_2 <= 4e-33)
		tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)));
	elseif (t_2 <= 200000000.0)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (t_2 <= 5e+21)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z)));
	elseif (t_2 <= 5e+45)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / (z - t));
	t_2 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_2 <= -400000000.0)
		tmp = t_1;
	elseif (t_2 <= 2e-76)
		tmp = a * 120.0;
	elseif (t_2 <= 4e-33)
		tmp = 60.0 / ((z - t) / (x - y));
	elseif (t_2 <= 200000000.0)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif (t_2 <= 5e+21)
		tmp = (a * 120.0) + (60.0 * (x / z));
	elseif (t_2 <= 5e+45)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	else
		tmp = t_1;
	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[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -400000000.0], t$95$1, If[LessEqual[t$95$2, 2e-76], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 4e-33], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 200000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+21], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+45], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{-33}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\

\mathbf{elif}\;t_2 \leq 200000000:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4e8 or 5e45 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 98.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 82.1%

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

    if -4e8 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1.99999999999999985e-76

    1. Initial program 99.9%

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

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

    if 1.99999999999999985e-76 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.0000000000000002e-33

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.6%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.6%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 99.3%

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

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

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

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

    if 4.0000000000000002e-33 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2e8

    1. Initial program 99.8%

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

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

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

    if 2e8 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5e21

    1. Initial program 99.2%

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

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

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

    if 5e21 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5e45

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -400000000:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 2 \cdot 10^{-76}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 4 \cdot 10^{-33}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 200000000:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 5 \cdot 10^{+21}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 5 \cdot 10^{+45}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]

Alternative 4: 82.4% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.99999999999999975e60 or 4e177 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 98.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.8%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 91.1%

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    8. Applied egg-rr91.2%

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

    if -4.99999999999999975e60 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4e177

    1. Initial program 99.8%

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

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

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

Alternative 5: 72.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;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)))))
   (if (<= (* a 120.0) -2e+53)
     (* a 120.0)
     (if (<= (* a 120.0) -1e-100)
       (+ (* a 120.0) (* 60.0 (/ x z)))
       (if (<= (* a 120.0) 2e-148)
         t_1
         (if (<= (* a 120.0) 5e-125)
           (+ (* a 120.0) (* -60.0 (/ x t)))
           (if (<= (* a 120.0) 1000000.0) 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 tmp;
	if ((a * 120.0) <= -2e+53) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-100) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 2e-148) {
		tmp = t_1;
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1000000.0) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if ((a * 120.0d0) <= (-2d+53)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-1d-100)) then
        tmp = (a * 120.0d0) + (60.0d0 * (x / z))
    else if ((a * 120.0d0) <= 2d-148) then
        tmp = t_1
    else if ((a * 120.0d0) <= 5d-125) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    else if ((a * 120.0d0) <= 1000000.0d0) 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 tmp;
	if ((a * 120.0) <= -2e+53) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-100) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 2e-148) {
		tmp = t_1;
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1000000.0) {
		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))
	tmp = 0
	if (a * 120.0) <= -2e+53:
		tmp = a * 120.0
	elif (a * 120.0) <= -1e-100:
		tmp = (a * 120.0) + (60.0 * (x / z))
	elif (a * 120.0) <= 2e-148:
		tmp = t_1
	elif (a * 120.0) <= 5e-125:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	elif (a * 120.0) <= 1000000.0:
		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)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -2e+53)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -1e-100)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z)));
	elseif (Float64(a * 120.0) <= 2e-148)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 5e-125)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	elseif (Float64(a * 120.0) <= 1000000.0)
		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));
	tmp = 0.0;
	if ((a * 120.0) <= -2e+53)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -1e-100)
		tmp = (a * 120.0) + (60.0 * (x / z));
	elseif ((a * 120.0) <= 2e-148)
		tmp = t_1;
	elseif ((a * 120.0) <= 5e-125)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	elseif ((a * 120.0) <= 1000000.0)
		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]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2e53 or 1e6 < (*.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 84.2%

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

    if -2e53 < (*.f64 a 120) < -1e-100

    1. Initial program 99.9%

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

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

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

    if -1e-100 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 98.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 83.0%

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

    if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125

    1. Initial program 100.0%

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

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

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

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

Alternative 6: 72.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;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)))))
   (if (<= (* a 120.0) -2e+53)
     (* a 120.0)
     (if (<= (* a 120.0) -1e-100)
       (+ (* a 120.0) (* 60.0 (/ x z)))
       (if (<= (* a 120.0) 2e-152)
         t_1
         (if (<= (* a 120.0) 5e-125)
           (+ (* a 120.0) (* 60.0 (/ y t)))
           (if (<= (* a 120.0) 1000000.0) 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 tmp;
	if ((a * 120.0) <= -2e+53) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-100) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 2e-152) {
		tmp = t_1;
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if ((a * 120.0) <= 1000000.0) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if ((a * 120.0d0) <= (-2d+53)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-1d-100)) then
        tmp = (a * 120.0d0) + (60.0d0 * (x / z))
    else if ((a * 120.0d0) <= 2d-152) then
        tmp = t_1
    else if ((a * 120.0d0) <= 5d-125) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if ((a * 120.0d0) <= 1000000.0d0) 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 tmp;
	if ((a * 120.0) <= -2e+53) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-100) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= 2e-152) {
		tmp = t_1;
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if ((a * 120.0) <= 1000000.0) {
		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))
	tmp = 0
	if (a * 120.0) <= -2e+53:
		tmp = a * 120.0
	elif (a * 120.0) <= -1e-100:
		tmp = (a * 120.0) + (60.0 * (x / z))
	elif (a * 120.0) <= 2e-152:
		tmp = t_1
	elif (a * 120.0) <= 5e-125:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif (a * 120.0) <= 1000000.0:
		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)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -2e+53)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -1e-100)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z)));
	elseif (Float64(a * 120.0) <= 2e-152)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 5e-125)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (Float64(a * 120.0) <= 1000000.0)
		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));
	tmp = 0.0;
	if ((a * 120.0) <= -2e+53)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -1e-100)
		tmp = (a * 120.0) + (60.0 * (x / z));
	elseif ((a * 120.0) <= 2e-152)
		tmp = t_1;
	elseif ((a * 120.0) <= 5e-125)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif ((a * 120.0) <= 1000000.0)
		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]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-152], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2e53 or 1e6 < (*.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 84.2%

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

    if -2e53 < (*.f64 a 120) < -1e-100

    1. Initial program 99.9%

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

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

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

    if -1e-100 < (*.f64 a 120) < 2.00000000000000013e-152 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 98.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 82.7%

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

    if 2.00000000000000013e-152 < (*.f64 a 120) < 4.99999999999999967e-125

    1. Initial program 99.8%

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

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

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

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

Alternative 7: 73.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-10}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 1000000:\\ \;\;\;\;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)))))
   (if (<= (* a 120.0) -1e-10)
     (* a 120.0)
     (if (<= (* a 120.0) 2e-148)
       t_1
       (if (<= (* a 120.0) 5e-125)
         (+ (* a 120.0) (* -60.0 (/ x t)))
         (if (<= (* a 120.0) 1000000.0) 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 tmp;
	if ((a * 120.0) <= -1e-10) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 2e-148) {
		tmp = t_1;
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1000000.0) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if ((a * 120.0d0) <= (-1d-10)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= 2d-148) then
        tmp = t_1
    else if ((a * 120.0d0) <= 5d-125) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    else if ((a * 120.0d0) <= 1000000.0d0) 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 tmp;
	if ((a * 120.0) <= -1e-10) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 2e-148) {
		tmp = t_1;
	} else if ((a * 120.0) <= 5e-125) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1000000.0) {
		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))
	tmp = 0
	if (a * 120.0) <= -1e-10:
		tmp = a * 120.0
	elif (a * 120.0) <= 2e-148:
		tmp = t_1
	elif (a * 120.0) <= 5e-125:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	elif (a * 120.0) <= 1000000.0:
		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)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -1e-10)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= 2e-148)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 5e-125)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	elseif (Float64(a * 120.0) <= 1000000.0)
		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));
	tmp = 0.0;
	if ((a * 120.0) <= -1e-10)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= 2e-148)
		tmp = t_1;
	elseif ((a * 120.0) <= 5e-125)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	elseif ((a * 120.0) <= 1000000.0)
		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]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-10], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -1.00000000000000004e-10 or 1e6 < (*.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 80.7%

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

    if -1.00000000000000004e-10 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6

    1. Initial program 99.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 79.6%

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

    if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125

    1. Initial program 100.0%

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

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

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

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

Alternative 8: 57.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-119} \lor \neg \left(a \leq 10^{-149}\right) \land \left(a \leq 3.3 \cdot 10^{-133} \lor \neg \left(a \leq 6.2 \cdot 10^{-40}\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.5000000000000001e-119 or 9.99999999999999979e-150 < a < 3.30000000000000009e-133 or 6.20000000000000021e-40 < a

    1. Initial program 99.3%

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

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

    if -1.5000000000000001e-119 < a < 9.99999999999999979e-150 or 3.30000000000000009e-133 < a < 6.20000000000000021e-40

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 88.3%

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    8. Applied egg-rr88.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{-119} \lor \neg \left(a \leq 10^{-149}\right) \land \left(a \leq 3.3 \cdot 10^{-133} \lor \neg \left(a \leq 6.2 \cdot 10^{-40}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 9: 57.0% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;a \leq 2.46 \cdot 10^{-132} \lor \neg \left(a \leq 3.8 \cdot 10^{-38}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.01999999999999996e-112 or 9.3999999999999998e-150 < a < 2.45999999999999998e-132 or 3.8e-38 < a

    1. Initial program 99.3%

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

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

    if -1.01999999999999996e-112 < a < 9.3999999999999998e-150

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 89.7%

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    8. Applied egg-rr89.8%

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

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

    if 2.45999999999999998e-132 < a < 3.8e-38

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.6%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.6%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 84.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-112}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{-150}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 2.46 \cdot 10^{-132} \lor \neg \left(a \leq 3.8 \cdot 10^{-38}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 10: 57.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;a \leq 5 \cdot 10^{-132} \lor \neg \left(a \leq 2.1 \cdot 10^{-41}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.39999999999999981e-114 or 1.24999999999999992e-149 < a < 4.9999999999999999e-132 or 2.10000000000000013e-41 < a

    1. Initial program 99.3%

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

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

    if -3.39999999999999981e-114 < a < 1.24999999999999992e-149

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 89.7%

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    8. Applied egg-rr89.8%

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

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

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

        \[\leadsto \frac{60}{\frac{\color{blue}{-\left(z - t\right)}}{y}} \]
    11. Simplified58.1%

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

    if 4.9999999999999999e-132 < a < 2.10000000000000013e-41

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.6%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.6%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 84.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-114}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-149}:\\ \;\;\;\;\frac{60}{\frac{t - z}{y}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-132} \lor \neg \left(a \leq 2.1 \cdot 10^{-41}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \end{array} \]

Alternative 11: 87.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+75} \lor \neg \left(x \leq 2.5 \cdot 10^{+175}\right):\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.69999999999999984e75 or 2.5e175 < x

    1. Initial program 98.4%

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

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

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

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

    if -4.69999999999999984e75 < x < 2.5e175

    1. Initial program 99.8%

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

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

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

Alternative 12: 74.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{-16} \lor \neg \left(a \leq 38000000\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 -1.25e-16) (not (<= a 38000000.0)))
   (* 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 <= -1.25e-16) || !(a <= 38000000.0)) {
		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 <= (-1.25d-16)) .or. (.not. (a <= 38000000.0d0))) 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 <= -1.25e-16) || !(a <= 38000000.0)) {
		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 <= -1.25e-16) or not (a <= 38000000.0):
		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 <= -1.25e-16) || !(a <= 38000000.0))
		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 <= -1.25e-16) || ~((a <= 38000000.0)))
		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, -1.25e-16], N[Not[LessEqual[a, 38000000.0]], $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 -1.25 \cdot 10^{-16} \lor \neg \left(a \leq 38000000\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 < -1.2500000000000001e-16 or 3.8e7 < a

    1. Initial program 99.9%

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

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

    if -1.2500000000000001e-16 < a < 3.8e7

    1. Initial program 99.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.7%

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

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 76.6%

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

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

Alternative 13: 99.8% accurate, 1.0× speedup?

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

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

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

      \[\leadsto \color{blue}{\frac{60}{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 \left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120 \]

Alternative 14: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{x - y}{-\color{blue}{\left(z - t\right) \cdot \frac{1}{60}}}\right) + a \cdot 120 \]
    6. distribute-rgt-neg-in99.8%

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

      \[\leadsto \left(-\frac{x - y}{\left(z - t\right) \cdot \left(-\color{blue}{0.016666666666666666}\right)}\right) + a \cdot 120 \]
    8. metadata-eval99.8%

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

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

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

Alternative 15: 52.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-183} \lor \neg \left(a \leq 6.5 \cdot 10^{-206}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8000000000000001e-183 or 6.4999999999999996e-206 < a

    1. Initial program 99.4%

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

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

    if -1.8000000000000001e-183 < a < 6.4999999999999996e-206

    1. Initial program 99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-183} \lor \neg \left(a \leq 6.5 \cdot 10^{-206}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \end{array} \]

Alternative 16: 52.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.3 \cdot 10^{-187} \lor \neg \left(a \leq 5.8 \cdot 10^{-207}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.2999999999999995e-187 or 5.80000000000000022e-207 < a

    1. Initial program 99.4%

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

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

    if -8.2999999999999995e-187 < a < 5.80000000000000022e-207

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{z} \cdot x} \]
    6. Simplified25.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.3 \cdot 10^{-187} \lor \neg \left(a \leq 5.8 \cdot 10^{-207}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \end{array} \]

Alternative 17: 51.6% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

    if 9.4999999999999997e193 < y

    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 \color{blue}{a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. fma-def99.7%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)} \]
    4. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    5. Applied egg-rr99.8%

      \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60}{\frac{z - t}{x - y}}}\right) \]
    6. Taylor expanded in a around 0 79.4%

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z}\right)} \]
    9. Step-by-step derivation
      1. neg-mul-141.9%

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

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

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

Alternative 18: 50.7% accurate, 4.3× speedup?

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

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

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

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

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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