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

Percentage Accurate: 99.3% → 99.8%
Time: 18.9s
Alternatives: 19
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 19 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}{z - t} \cdot \left(x - y\right)\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(Float64(60.0 / Float64(z - t)) * Float64(x - y)))
end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

      \[\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. Add Preprocessing
  5. Final simplification99.8%

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

Alternative 2: 80.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ t_2 := a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+221}:\\ \;\;\;\;60 \cdot \left(\left(x - y\right) \cdot \frac{1}{z - t}\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+94}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+71}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \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 (/ (- z t) x)))))
   (if (<= t_1 -5e+221)
     (* 60.0 (* (- x y) (/ 1.0 (- z t))))
     (if (<= t_1 -5e+94)
       t_2
       (if (<= t_1 -5e-17)
         t_1
         (if (<= t_1 5e+71) t_2 (* 60.0 (/ (- x y) (- z t)))))))))
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 / ((z - t) / x));
	double tmp;
	if (t_1 <= -5e+221) {
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
	} else if (t_1 <= -5e+94) {
		tmp = t_2;
	} else if (t_1 <= -5e-17) {
		tmp = t_1;
	} else if (t_1 <= 5e+71) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (60.0d0 * (x - y)) / (z - t)
    t_2 = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
    if (t_1 <= (-5d+221)) then
        tmp = 60.0d0 * ((x - y) * (1.0d0 / (z - t)))
    else if (t_1 <= (-5d+94)) then
        tmp = t_2
    else if (t_1 <= (-5d-17)) then
        tmp = t_1
    else if (t_1 <= 5d+71) then
        tmp = t_2
    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 t_1 = (60.0 * (x - y)) / (z - t);
	double t_2 = (a * 120.0) + (60.0 / ((z - t) / x));
	double tmp;
	if (t_1 <= -5e+221) {
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
	} else if (t_1 <= -5e+94) {
		tmp = t_2;
	} else if (t_1 <= -5e-17) {
		tmp = t_1;
	} else if (t_1 <= 5e+71) {
		tmp = t_2;
	} else {
		tmp = 60.0 * ((x - y) / (z - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (60.0 * (x - y)) / (z - t)
	t_2 = (a * 120.0) + (60.0 / ((z - t) / x))
	tmp = 0
	if t_1 <= -5e+221:
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)))
	elif t_1 <= -5e+94:
		tmp = t_2
	elif t_1 <= -5e-17:
		tmp = t_1
	elif t_1 <= 5e+71:
		tmp = t_2
	else:
		tmp = 60.0 * ((x - y) / (z - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	t_2 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x)))
	tmp = 0.0
	if (t_1 <= -5e+221)
		tmp = Float64(60.0 * Float64(Float64(x - y) * Float64(1.0 / Float64(z - t))));
	elseif (t_1 <= -5e+94)
		tmp = t_2;
	elseif (t_1 <= -5e-17)
		tmp = t_1;
	elseif (t_1 <= 5e+71)
		tmp = t_2;
	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)
	t_1 = (60.0 * (x - y)) / (z - t);
	t_2 = (a * 120.0) + (60.0 / ((z - t) / x));
	tmp = 0.0;
	if (t_1 <= -5e+221)
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
	elseif (t_1 <= -5e+94)
		tmp = t_2;
	elseif (t_1 <= -5e-17)
		tmp = t_1;
	elseif (t_1 <= 5e+71)
		tmp = t_2;
	else
		tmp = 60.0 * ((x - y) / (z - t));
	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]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+221], N[(60.0 * N[(N[(x - y), $MachinePrecision] * N[(1.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+94], t$95$2, If[LessEqual[t$95$1, -5e-17], t$95$1, If[LessEqual[t$95$1, 5e+71], t$95$2, N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
t_2 := a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+221}:\\
\;\;\;\;60 \cdot \left(\left(x - y\right) \cdot \frac{1}{z - t}\right)\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

    if -5.0000000000000002e221 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000001e94 or -4.9999999999999999e-17 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e71

    1. Initial program 99.8%

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

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

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

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

    if -5.0000000000000001e94 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e-17

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/l*100.0%

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)}^{3}} + a \cdot 120 \]
      4. *-un-lft-identity97.9%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}}}\right)}^{3} + a \cdot 120 \]
      6. metadata-eval98.3%

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

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

      \[\leadsto \color{blue}{60 \cdot \left({1}^{0.3333333333333333} \cdot \frac{x - y}{z - t}\right)} \]
    8. Step-by-step derivation
      1. pow-base-186.7%

        \[\leadsto 60 \cdot \left(\color{blue}{1} \cdot \frac{x - y}{z - t}\right) \]
      2. *-lft-identity86.7%

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

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

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

    if 4.99999999999999972e71 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

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

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

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

Alternative 3: 80.5% accurate, 0.2× 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^{+221}:\\ \;\;\;\;60 \cdot \left(\left(x - y\right) \cdot \frac{1}{z - t}\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+94}:\\ \;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+71}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_1 -5e+221)
     (* 60.0 (* (- x y) (/ 1.0 (- z t))))
     (if (<= t_1 -5e+94)
       (+ (* a 120.0) (/ x (/ (- z t) 60.0)))
       (if (<= t_1 -5e-17)
         t_1
         (if (<= t_1 5e+71)
           (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
           (* 60.0 (/ (- x y) (- z t)))))))))
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+221) {
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
	} else if (t_1 <= -5e+94) {
		tmp = (a * 120.0) + (x / ((z - t) / 60.0));
	} else if (t_1 <= -5e-17) {
		tmp = t_1;
	} else if (t_1 <= 5e+71) {
		tmp = (a * 120.0) + (60.0 / ((z - t) / x));
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (60.0d0 * (x - y)) / (z - t)
    if (t_1 <= (-5d+221)) then
        tmp = 60.0d0 * ((x - y) * (1.0d0 / (z - t)))
    else if (t_1 <= (-5d+94)) then
        tmp = (a * 120.0d0) + (x / ((z - t) / 60.0d0))
    else if (t_1 <= (-5d-17)) then
        tmp = t_1
    else if (t_1 <= 5d+71) then
        tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
    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 t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_1 <= -5e+221) {
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
	} else if (t_1 <= -5e+94) {
		tmp = (a * 120.0) + (x / ((z - t) / 60.0));
	} else if (t_1 <= -5e-17) {
		tmp = t_1;
	} else if (t_1 <= 5e+71) {
		tmp = (a * 120.0) + (60.0 / ((z - t) / x));
	} else {
		tmp = 60.0 * ((x - y) / (z - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (60.0 * (x - y)) / (z - t)
	tmp = 0
	if t_1 <= -5e+221:
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)))
	elif t_1 <= -5e+94:
		tmp = (a * 120.0) + (x / ((z - t) / 60.0))
	elif t_1 <= -5e-17:
		tmp = t_1
	elif t_1 <= 5e+71:
		tmp = (a * 120.0) + (60.0 / ((z - t) / x))
	else:
		tmp = 60.0 * ((x - y) / (z - t))
	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+221)
		tmp = Float64(60.0 * Float64(Float64(x - y) * Float64(1.0 / Float64(z - t))));
	elseif (t_1 <= -5e+94)
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0)));
	elseif (t_1 <= -5e-17)
		tmp = t_1;
	elseif (t_1 <= 5e+71)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x)));
	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)
	t_1 = (60.0 * (x - y)) / (z - t);
	tmp = 0.0;
	if (t_1 <= -5e+221)
		tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
	elseif (t_1 <= -5e+94)
		tmp = (a * 120.0) + (x / ((z - t) / 60.0));
	elseif (t_1 <= -5e-17)
		tmp = t_1;
	elseif (t_1 <= 5e+71)
		tmp = (a * 120.0) + (60.0 / ((z - t) / x));
	else
		tmp = 60.0 * ((x - y) / (z - t));
	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[LessEqual[t$95$1, -5e+221], N[(60.0 * N[(N[(x - y), $MachinePrecision] * N[(1.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+94], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-17], t$95$1, If[LessEqual[t$95$1, 5e+71], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $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^{+221}:\\
\;\;\;\;60 \cdot \left(\left(x - y\right) \cdot \frac{1}{z - t}\right)\\

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e221

    1. Initial program 99.6%

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

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

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

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

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

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

    if -5.0000000000000002e221 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000001e94

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -5.0000000000000001e94 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e-17

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/l*100.0%

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{60 \cdot \left(x - y\right)}{z - t}}\right)}^{3}} + a \cdot 120 \]
      4. *-un-lft-identity97.9%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\frac{60}{1} \cdot \frac{x - y}{z - t}}}\right)}^{3} + a \cdot 120 \]
      6. metadata-eval98.3%

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

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

      \[\leadsto \color{blue}{60 \cdot \left({1}^{0.3333333333333333} \cdot \frac{x - y}{z - t}\right)} \]
    8. Step-by-step derivation
      1. pow-base-186.7%

        \[\leadsto 60 \cdot \left(\color{blue}{1} \cdot \frac{x - y}{z - t}\right) \]
      2. *-lft-identity86.7%

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

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

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

    if -4.9999999999999999e-17 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e71

    1. Initial program 99.8%

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

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

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

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

    if 4.99999999999999972e71 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

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

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

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

Alternative 4: 74.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{-46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 10^{-228}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-205}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z (- x y))))))
   (if (<= z -2.4e-46)
     t_1
     (if (<= z 1e-228)
       (/ (* 60.0 (- x y)) (- z t))
       (if (<= z 2.5e-205)
         (+ (* a 120.0) (/ (* x -60.0) t))
         (if (<= z 4.5e-26) (* 60.0 (/ (- x y) (- z t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a * 120.0) + (60.0 / (z / (x - y)));
	double tmp;
	if (z <= -2.4e-46) {
		tmp = t_1;
	} else if (z <= 1e-228) {
		tmp = (60.0 * (x - y)) / (z - t);
	} else if (z <= 2.5e-205) {
		tmp = (a * 120.0) + ((x * -60.0) / t);
	} else if (z <= 4.5e-26) {
		tmp = 60.0 * ((x - y) / (z - 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) :: tmp
    t_1 = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
    if (z <= (-2.4d-46)) then
        tmp = t_1
    else if (z <= 1d-228) then
        tmp = (60.0d0 * (x - y)) / (z - t)
    else if (z <= 2.5d-205) then
        tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
    else if (z <= 4.5d-26) then
        tmp = 60.0d0 * ((x - y) / (z - 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 = (a * 120.0) + (60.0 / (z / (x - y)));
	double tmp;
	if (z <= -2.4e-46) {
		tmp = t_1;
	} else if (z <= 1e-228) {
		tmp = (60.0 * (x - y)) / (z - t);
	} else if (z <= 2.5e-205) {
		tmp = (a * 120.0) + ((x * -60.0) / t);
	} else if (z <= 4.5e-26) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a * 120.0) + (60.0 / (z / (x - y)))
	tmp = 0
	if z <= -2.4e-46:
		tmp = t_1
	elif z <= 1e-228:
		tmp = (60.0 * (x - y)) / (z - t)
	elif z <= 2.5e-205:
		tmp = (a * 120.0) + ((x * -60.0) / t)
	elif z <= 4.5e-26:
		tmp = 60.0 * ((x - y) / (z - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y))))
	tmp = 0.0
	if (z <= -2.4e-46)
		tmp = t_1;
	elseif (z <= 1e-228)
		tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t));
	elseif (z <= 2.5e-205)
		tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t));
	elseif (z <= 4.5e-26)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (a * 120.0) + (60.0 / (z / (x - y)));
	tmp = 0.0;
	if (z <= -2.4e-46)
		tmp = t_1;
	elseif (z <= 1e-228)
		tmp = (60.0 * (x - y)) / (z - t);
	elseif (z <= 2.5e-205)
		tmp = (a * 120.0) + ((x * -60.0) / t);
	elseif (z <= 4.5e-26)
		tmp = 60.0 * ((x - y) / (z - t));
	else
		tmp = t_1;
	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[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e-46], t$95$1, If[LessEqual[z, 1e-228], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-205], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-26], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.40000000000000013e-46 or 4.4999999999999999e-26 < z

    1. Initial program 99.7%

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

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

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

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

    if -2.40000000000000013e-46 < z < 1.00000000000000003e-228

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/l*99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \left({1}^{0.3333333333333333} \cdot \frac{x - y}{z - t}\right)} \]
    8. Step-by-step derivation
      1. pow-base-176.4%

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

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

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

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

    if 1.00000000000000003e-228 < z < 2.5e-205

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot x}{t}} + a \cdot 120 \]
      2. metadata-eval100.0%

        \[\leadsto \frac{\color{blue}{\left(-60\right)} \cdot x}{t} + a \cdot 120 \]
      3. distribute-lft-neg-in100.0%

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

        \[\leadsto \frac{-\color{blue}{x \cdot 60}}{t} + a \cdot 120 \]
      5. distribute-rgt-neg-in100.0%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-60\right)}}{t} + a \cdot 120 \]
      6. metadata-eval100.0%

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

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

    if 2.5e-205 < z < 4.4999999999999999e-26

    1. Initial program 99.7%

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

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

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

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

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

Alternative 5: 67.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-236}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-206}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= z -2.9e-46)
     (+ (* a 120.0) (/ x (* z 0.016666666666666666)))
     (if (<= z 5e-236)
       t_1
       (if (<= z 2.25e-206)
         (+ (* a 120.0) (* 60.0 (/ y t)))
         (if (<= z 2.6e-25) t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (z <= -2.9e-46) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if (z <= 5e-236) {
		tmp = t_1;
	} else if (z <= 2.25e-206) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (z <= 2.6e-25) {
		tmp = t_1;
	} else {
		tmp = (a * 120.0) + (-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) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if (z <= (-2.9d-46)) then
        tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
    else if (z <= 5d-236) then
        tmp = t_1
    else if (z <= 2.25d-206) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if (z <= 2.6d-25) then
        tmp = t_1
    else
        tmp = (a * 120.0d0) + ((-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 t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (z <= -2.9e-46) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if (z <= 5e-236) {
		tmp = t_1;
	} else if (z <= 2.25e-206) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (z <= 2.6e-25) {
		tmp = t_1;
	} else {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if z <= -2.9e-46:
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666))
	elif z <= 5e-236:
		tmp = t_1
	elif z <= 2.25e-206:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif z <= 2.6e-25:
		tmp = t_1
	else:
		tmp = (a * 120.0) + (-60.0 * (y / z))
	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 (z <= -2.9e-46)
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666)));
	elseif (z <= 5e-236)
		tmp = t_1;
	elseif (z <= 2.25e-206)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (z <= 2.6e-25)
		tmp = t_1;
	else
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)));
	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 (z <= -2.9e-46)
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	elseif (z <= 5e-236)
		tmp = t_1;
	elseif (z <= 2.25e-206)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif (z <= 2.6e-25)
		tmp = t_1;
	else
		tmp = (a * 120.0) + (-60.0 * (y / z));
	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[z, -2.9e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-236], t$95$1, If[LessEqual[z, 2.25e-206], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-25], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.90000000000000005e-46

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. *-commutative80.3%

        \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    10. Simplified80.3%

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

    if -2.90000000000000005e-46 < z < 4.9999999999999998e-236 or 2.2499999999999999e-206 < z < 2.6e-25

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

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

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

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

    if 4.9999999999999998e-236 < z < 2.2499999999999999e-206

    1. Initial program 100.0%

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

      \[\leadsto \frac{\color{blue}{-60 \cdot y + 60 \cdot x}}{z - t} + a \cdot 120 \]
    4. Step-by-step derivation
      1. fma-def100.0%

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + 120 \cdot a} \]
    7. Step-by-step derivation
      1. +-commutative100.0%

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

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

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

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

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

    if 2.6e-25 < z

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-236}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-206}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-234}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-206}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= z -2.9e-46)
     (+ (* a 120.0) (/ x (* z 0.016666666666666666)))
     (if (<= z 9.5e-234)
       t_1
       (if (<= z 2.1e-206)
         (+ (* a 120.0) (* 60.0 (/ y t)))
         (if (<= z 4.4e-26) t_1 (+ (* a 120.0) (/ y (/ z -60.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 (z <= -2.9e-46) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if (z <= 9.5e-234) {
		tmp = t_1;
	} else if (z <= 2.1e-206) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (z <= 4.4e-26) {
		tmp = t_1;
	} else {
		tmp = (a * 120.0) + (y / (z / -60.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 (z <= (-2.9d-46)) then
        tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
    else if (z <= 9.5d-234) then
        tmp = t_1
    else if (z <= 2.1d-206) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if (z <= 4.4d-26) then
        tmp = t_1
    else
        tmp = (a * 120.0d0) + (y / (z / (-60.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 (z <= -2.9e-46) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if (z <= 9.5e-234) {
		tmp = t_1;
	} else if (z <= 2.1e-206) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (z <= 4.4e-26) {
		tmp = t_1;
	} else {
		tmp = (a * 120.0) + (y / (z / -60.0));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if z <= -2.9e-46:
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666))
	elif z <= 9.5e-234:
		tmp = t_1
	elif z <= 2.1e-206:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif z <= 4.4e-26:
		tmp = t_1
	else:
		tmp = (a * 120.0) + (y / (z / -60.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 (z <= -2.9e-46)
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666)));
	elseif (z <= 9.5e-234)
		tmp = t_1;
	elseif (z <= 2.1e-206)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (z <= 4.4e-26)
		tmp = t_1;
	else
		tmp = Float64(Float64(a * 120.0) + Float64(y / Float64(z / -60.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 (z <= -2.9e-46)
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	elseif (z <= 9.5e-234)
		tmp = t_1;
	elseif (z <= 2.1e-206)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif (z <= 4.4e-26)
		tmp = t_1;
	else
		tmp = (a * 120.0) + (y / (z / -60.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[z, -2.9e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-234], t$95$1, If[LessEqual[z, 2.1e-206], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-26], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(y / N[(z / -60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.90000000000000005e-46

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. *-commutative80.3%

        \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    10. Simplified80.3%

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

    if -2.90000000000000005e-46 < z < 9.4999999999999999e-234 or 2.1000000000000001e-206 < z < 4.4000000000000002e-26

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

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

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

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

    if 9.4999999999999999e-234 < z < 2.1000000000000001e-206

    1. Initial program 100.0%

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

      \[\leadsto \frac{\color{blue}{-60 \cdot y + 60 \cdot x}}{z - t} + a \cdot 120 \]
    4. Step-by-step derivation
      1. fma-def100.0%

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + 120 \cdot a} \]
    7. Step-by-step derivation
      1. +-commutative100.0%

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

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

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

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

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

    if 4.4000000000000002e-26 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-234}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-206}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-26}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-201}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= z -1.5e-46)
     (+ (* a 120.0) (/ x (* z 0.016666666666666666)))
     (if (<= z 6e-231)
       t_1
       (if (<= z 1.32e-201)
         (+ (* a 120.0) (/ (* x -60.0) t))
         (if (<= z 1.9e-24) t_1 (+ (* a 120.0) (/ y (/ z -60.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 (z <= -1.5e-46) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if (z <= 6e-231) {
		tmp = t_1;
	} else if (z <= 1.32e-201) {
		tmp = (a * 120.0) + ((x * -60.0) / t);
	} else if (z <= 1.9e-24) {
		tmp = t_1;
	} else {
		tmp = (a * 120.0) + (y / (z / -60.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 (z <= (-1.5d-46)) then
        tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
    else if (z <= 6d-231) then
        tmp = t_1
    else if (z <= 1.32d-201) then
        tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
    else if (z <= 1.9d-24) then
        tmp = t_1
    else
        tmp = (a * 120.0d0) + (y / (z / (-60.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 (z <= -1.5e-46) {
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	} else if (z <= 6e-231) {
		tmp = t_1;
	} else if (z <= 1.32e-201) {
		tmp = (a * 120.0) + ((x * -60.0) / t);
	} else if (z <= 1.9e-24) {
		tmp = t_1;
	} else {
		tmp = (a * 120.0) + (y / (z / -60.0));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if z <= -1.5e-46:
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666))
	elif z <= 6e-231:
		tmp = t_1
	elif z <= 1.32e-201:
		tmp = (a * 120.0) + ((x * -60.0) / t)
	elif z <= 1.9e-24:
		tmp = t_1
	else:
		tmp = (a * 120.0) + (y / (z / -60.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 (z <= -1.5e-46)
		tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666)));
	elseif (z <= 6e-231)
		tmp = t_1;
	elseif (z <= 1.32e-201)
		tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t));
	elseif (z <= 1.9e-24)
		tmp = t_1;
	else
		tmp = Float64(Float64(a * 120.0) + Float64(y / Float64(z / -60.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 (z <= -1.5e-46)
		tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
	elseif (z <= 6e-231)
		tmp = t_1;
	elseif (z <= 1.32e-201)
		tmp = (a * 120.0) + ((x * -60.0) / t);
	elseif (z <= 1.9e-24)
		tmp = t_1;
	else
		tmp = (a * 120.0) + (y / (z / -60.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[z, -1.5e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-231], t$95$1, If[LessEqual[z, 1.32e-201], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-24], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(y / N[(z / -60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 6 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.49999999999999994e-46

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. *-commutative80.3%

        \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    10. Simplified80.3%

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

    if -1.49999999999999994e-46 < z < 6.0000000000000005e-231 or 1.31999999999999996e-201 < z < 1.90000000000000013e-24

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

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

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

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

    if 6.0000000000000005e-231 < z < 1.31999999999999996e-201

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot x}{t}} + a \cdot 120 \]
      2. metadata-eval100.0%

        \[\leadsto \frac{\color{blue}{\left(-60\right)} \cdot x}{t} + a \cdot 120 \]
      3. distribute-lft-neg-in100.0%

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

        \[\leadsto \frac{-\color{blue}{x \cdot 60}}{t} + a \cdot 120 \]
      5. distribute-rgt-neg-in100.0%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-60\right)}}{t} + a \cdot 120 \]
      6. metadata-eval100.0%

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

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

    if 1.90000000000000013e-24 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-231}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-201}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-24}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 67.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.90000000000000005e-46

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. *-commutative80.3%

        \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    10. Simplified80.3%

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

    if -2.90000000000000005e-46 < z < 9.50000000000000024e-228

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

      \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/l*99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \left({1}^{0.3333333333333333} \cdot \frac{x - y}{z - t}\right)} \]
    8. Step-by-step derivation
      1. pow-base-176.4%

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

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

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

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

    if 9.50000000000000024e-228 < z < 2.4000000000000002e-205

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot x}{t}} + a \cdot 120 \]
      2. metadata-eval100.0%

        \[\leadsto \frac{\color{blue}{\left(-60\right)} \cdot x}{t} + a \cdot 120 \]
      3. distribute-lft-neg-in100.0%

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

        \[\leadsto \frac{-\color{blue}{x \cdot 60}}{t} + a \cdot 120 \]
      5. distribute-rgt-neg-in100.0%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-60\right)}}{t} + a \cdot 120 \]
      6. metadata-eval100.0%

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

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

    if 2.4000000000000002e-205 < z < 1.7500000000000001e-25

    1. Initial program 99.7%

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

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

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

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

    if 1.7500000000000001e-25 < z

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\ \;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-228}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-205}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-25}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-205}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-258}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-111}:\\ \;\;\;\;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 (- z t)))))
   (if (<= a -1.45e-39)
     (* a 120.0)
     (if (<= a -3.1e-205)
       t_1
       (if (<= a -4.6e-258)
         (* -60.0 (/ (- x y) t))
         (if (<= a 7.2e-111) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -1.45e-39) {
		tmp = a * 120.0;
	} else if (a <= -3.1e-205) {
		tmp = t_1;
	} else if (a <= -4.6e-258) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 7.2e-111) {
		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 / (z - t))
    if (a <= (-1.45d-39)) then
        tmp = a * 120.0d0
    else if (a <= (-3.1d-205)) then
        tmp = t_1
    else if (a <= (-4.6d-258)) then
        tmp = (-60.0d0) * ((x - y) / t)
    else if (a <= 7.2d-111) 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 / (z - t));
	double tmp;
	if (a <= -1.45e-39) {
		tmp = a * 120.0;
	} else if (a <= -3.1e-205) {
		tmp = t_1;
	} else if (a <= -4.6e-258) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 7.2e-111) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * (x / (z - t))
	tmp = 0
	if a <= -1.45e-39:
		tmp = a * 120.0
	elif a <= -3.1e-205:
		tmp = t_1
	elif a <= -4.6e-258:
		tmp = -60.0 * ((x - y) / t)
	elif a <= 7.2e-111:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (a <= -1.45e-39)
		tmp = Float64(a * 120.0);
	elseif (a <= -3.1e-205)
		tmp = t_1;
	elseif (a <= -4.6e-258)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	elseif (a <= 7.2e-111)
		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 / (z - t));
	tmp = 0.0;
	if (a <= -1.45e-39)
		tmp = a * 120.0;
	elseif (a <= -3.1e-205)
		tmp = t_1;
	elseif (a <= -4.6e-258)
		tmp = -60.0 * ((x - y) / t);
	elseif (a <= 7.2e-111)
		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[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.45e-39], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.1e-205], t$95$1, If[LessEqual[a, -4.6e-258], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e-111], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4.6 \cdot 10^{-258}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 7.2 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.44999999999999994e-39 or 7.20000000000000019e-111 < a

    1. Initial program 99.8%

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

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

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

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

    if -1.44999999999999994e-39 < a < -3.09999999999999983e-205 or -4.59999999999999986e-258 < a < 7.20000000000000019e-111

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

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

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

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

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

    if -3.09999999999999983e-205 < a < -4.59999999999999986e-258

    1. Initial program 99.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-205}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-258}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-111}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 59.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-201}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;a \leq -1.16 \cdot 10^{-252}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 1.06 \cdot 10^{-110}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.0500000000000001e-30 or 1.0599999999999999e-110 < a

    1. Initial program 99.8%

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

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

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

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

    if -1.0500000000000001e-30 < a < -2.05000000000000001e-201

    1. Initial program 99.8%

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

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

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

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

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

    if -2.05000000000000001e-201 < a < -1.1599999999999999e-252

    1. Initial program 99.6%

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

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

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

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

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

    if -1.1599999999999999e-252 < a < 1.0599999999999999e-110

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-30}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-201}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq -1.16 \cdot 10^{-252}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-110}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.2% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

    if -9.9999999999999996e-24 < (*.f64 a 120) < 3.99999999999999972e-39

    1. Initial program 99.7%

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

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

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

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

    if 3.99999999999999972e-39 < (*.f64 a 120)

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

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

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

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

Alternative 12: 72.7% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

    if -9.9999999999999996e-24 < (*.f64 a 120) < 5.0000000000000002e-62

    1. Initial program 99.7%

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

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

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

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

    if 5.0000000000000002e-62 < (*.f64 a 120)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{0.016666666666666666 \cdot z}} + a \cdot 120 \]
    9. Step-by-step derivation
      1. *-commutative71.6%

        \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    10. Simplified71.6%

      \[\leadsto \frac{x}{\color{blue}{z \cdot 0.016666666666666666}} + a \cdot 120 \]
    11. Taylor expanded in x around 0 71.5%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{60}{z}} + a \cdot 120 \]
    13. Simplified71.5%

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

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

Alternative 13: 88.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+53} \lor \neg \left(y \leq 1.35 \cdot 10^{+101}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.70000000000000019e53 or 1.35000000000000003e101 < y

    1. Initial program 99.8%

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

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

    if -2.70000000000000019e53 < y < 1.35000000000000003e101

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 14: 75.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{-20} \lor \neg \left(a \leq 8.2 \cdot 10^{-36}\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.85e-20) (not (<= a 8.2e-36)))
   (* 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.85e-20) || !(a <= 8.2e-36)) {
		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.85d-20)) .or. (.not. (a <= 8.2d-36))) 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.85e-20) || !(a <= 8.2e-36)) {
		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.85e-20) or not (a <= 8.2e-36):
		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.85e-20) || !(a <= 8.2e-36))
		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.85e-20) || ~((a <= 8.2e-36)))
		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.85e-20], N[Not[LessEqual[a, 8.2e-36]], $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.85 \cdot 10^{-20} \lor \neg \left(a \leq 8.2 \cdot 10^{-36}\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.85e-20 or 8.20000000000000025e-36 < a

    1. Initial program 99.8%

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

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

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

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

    if -1.85e-20 < a < 8.20000000000000025e-36

    1. Initial program 99.7%

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

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

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

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

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

Alternative 15: 59.2% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.79999999999999978e-30 or 5.60000000000000023e-73 < a

    1. Initial program 99.8%

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

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

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

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

    if -5.79999999999999978e-30 < a < 5.60000000000000023e-73

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

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

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

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

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

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

Alternative 16: 53.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{-142} \lor \neg \left(a \leq 6 \cdot 10^{-176}\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 -9.2e-142) (not (<= a 6e-176))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -9.2e-142) || !(a <= 6e-176)) {
		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 <= (-9.2d-142)) .or. (.not. (a <= 6d-176))) 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 <= -9.2e-142) || !(a <= 6e-176)) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (x / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -9.2e-142) or not (a <= 6e-176):
		tmp = a * 120.0
	else:
		tmp = -60.0 * (x / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -9.2e-142) || !(a <= 6e-176))
		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 <= -9.2e-142) || ~((a <= 6e-176)))
		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, -9.2e-142], N[Not[LessEqual[a, 6e-176]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-142} \lor \neg \left(a \leq 6 \cdot 10^{-176}\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 < -9.20000000000000009e-142 or 6e-176 < a

    1. Initial program 99.8%

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

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

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

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

    if -9.20000000000000009e-142 < a < 6e-176

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 17: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 18: 99.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 19: 50.8% accurate, 4.3× speedup?

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

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

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

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

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

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

    \[\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 2024031 
(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)))