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

Percentage Accurate: 99.3% → 99.8%
Time: 18.3s
Alternatives: 20
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 20 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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 2: 57.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ t_2 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -1.2 \cdot 10^{+32}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-288}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-232}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-161}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (* 60.0 (/ x (- z t)))))
   (if (<= a -1.2e+32)
     (* a 120.0)
     (if (<= a -5.2e-288)
       t_2
       (if (<= a 4.6e-267)
         t_1
         (if (<= a 9.5e-232)
           t_2
           (if (<= a 5.2e-161)
             t_1
             (if (<= a 3.4e-103)
               t_2
               (if (<= a 1.02e-32) t_1 (* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -1.2e+32) {
		tmp = a * 120.0;
	} else if (a <= -5.2e-288) {
		tmp = t_2;
	} else if (a <= 4.6e-267) {
		tmp = t_1;
	} else if (a <= 9.5e-232) {
		tmp = t_2;
	} else if (a <= 5.2e-161) {
		tmp = t_1;
	} else if (a <= 3.4e-103) {
		tmp = t_2;
	} else if (a <= 1.02e-32) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-60.0d0) * (y / (z - t))
    t_2 = 60.0d0 * (x / (z - t))
    if (a <= (-1.2d+32)) then
        tmp = a * 120.0d0
    else if (a <= (-5.2d-288)) then
        tmp = t_2
    else if (a <= 4.6d-267) then
        tmp = t_1
    else if (a <= 9.5d-232) then
        tmp = t_2
    else if (a <= 5.2d-161) then
        tmp = t_1
    else if (a <= 3.4d-103) then
        tmp = t_2
    else if (a <= 1.02d-32) 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 * (y / (z - t));
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -1.2e+32) {
		tmp = a * 120.0;
	} else if (a <= -5.2e-288) {
		tmp = t_2;
	} else if (a <= 4.6e-267) {
		tmp = t_1;
	} else if (a <= 9.5e-232) {
		tmp = t_2;
	} else if (a <= 5.2e-161) {
		tmp = t_1;
	} else if (a <= 3.4e-103) {
		tmp = t_2;
	} else if (a <= 1.02e-32) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	t_2 = 60.0 * (x / (z - t))
	tmp = 0
	if a <= -1.2e+32:
		tmp = a * 120.0
	elif a <= -5.2e-288:
		tmp = t_2
	elif a <= 4.6e-267:
		tmp = t_1
	elif a <= 9.5e-232:
		tmp = t_2
	elif a <= 5.2e-161:
		tmp = t_1
	elif a <= 3.4e-103:
		tmp = t_2
	elif a <= 1.02e-32:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	t_2 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (a <= -1.2e+32)
		tmp = Float64(a * 120.0);
	elseif (a <= -5.2e-288)
		tmp = t_2;
	elseif (a <= 4.6e-267)
		tmp = t_1;
	elseif (a <= 9.5e-232)
		tmp = t_2;
	elseif (a <= 5.2e-161)
		tmp = t_1;
	elseif (a <= 3.4e-103)
		tmp = t_2;
	elseif (a <= 1.02e-32)
		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 * (y / (z - t));
	t_2 = 60.0 * (x / (z - t));
	tmp = 0.0;
	if (a <= -1.2e+32)
		tmp = a * 120.0;
	elseif (a <= -5.2e-288)
		tmp = t_2;
	elseif (a <= 4.6e-267)
		tmp = t_1;
	elseif (a <= 9.5e-232)
		tmp = t_2;
	elseif (a <= 5.2e-161)
		tmp = t_1;
	elseif (a <= 3.4e-103)
		tmp = t_2;
	elseif (a <= 1.02e-32)
		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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+32], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -5.2e-288], t$95$2, If[LessEqual[a, 4.6e-267], t$95$1, If[LessEqual[a, 9.5e-232], t$95$2, If[LessEqual[a, 5.2e-161], t$95$1, If[LessEqual[a, 3.4e-103], t$95$2, If[LessEqual[a, 1.02e-32], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-288}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-232}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-161}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 3: 57.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-60}{\frac{z - t}{y}}\\ t_2 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+31}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-296}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.65 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-234}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.26 \cdot 10^{-108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ -60.0 (/ (- z t) y))) (t_2 (* 60.0 (/ x (- z t)))))
   (if (<= a -5.6e+31)
     (* a 120.0)
     (if (<= a -4.5e-296)
       t_2
       (if (<= a 3.65e-267)
         t_1
         (if (<= a 7.8e-234)
           t_2
           (if (<= a 1.5e-145)
             t_1
             (if (<= a 1.26e-108)
               t_2
               (if (<= a 3.3e-34) t_1 (* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 / ((z - t) / y);
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -5.6e+31) {
		tmp = a * 120.0;
	} else if (a <= -4.5e-296) {
		tmp = t_2;
	} else if (a <= 3.65e-267) {
		tmp = t_1;
	} else if (a <= 7.8e-234) {
		tmp = t_2;
	} else if (a <= 1.5e-145) {
		tmp = t_1;
	} else if (a <= 1.26e-108) {
		tmp = t_2;
	} else if (a <= 3.3e-34) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-60.0d0) / ((z - t) / y)
    t_2 = 60.0d0 * (x / (z - t))
    if (a <= (-5.6d+31)) then
        tmp = a * 120.0d0
    else if (a <= (-4.5d-296)) then
        tmp = t_2
    else if (a <= 3.65d-267) then
        tmp = t_1
    else if (a <= 7.8d-234) then
        tmp = t_2
    else if (a <= 1.5d-145) then
        tmp = t_1
    else if (a <= 1.26d-108) then
        tmp = t_2
    else if (a <= 3.3d-34) 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 / ((z - t) / y);
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -5.6e+31) {
		tmp = a * 120.0;
	} else if (a <= -4.5e-296) {
		tmp = t_2;
	} else if (a <= 3.65e-267) {
		tmp = t_1;
	} else if (a <= 7.8e-234) {
		tmp = t_2;
	} else if (a <= 1.5e-145) {
		tmp = t_1;
	} else if (a <= 1.26e-108) {
		tmp = t_2;
	} else if (a <= 3.3e-34) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 / ((z - t) / y)
	t_2 = 60.0 * (x / (z - t))
	tmp = 0
	if a <= -5.6e+31:
		tmp = a * 120.0
	elif a <= -4.5e-296:
		tmp = t_2
	elif a <= 3.65e-267:
		tmp = t_1
	elif a <= 7.8e-234:
		tmp = t_2
	elif a <= 1.5e-145:
		tmp = t_1
	elif a <= 1.26e-108:
		tmp = t_2
	elif a <= 3.3e-34:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 / Float64(Float64(z - t) / y))
	t_2 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (a <= -5.6e+31)
		tmp = Float64(a * 120.0);
	elseif (a <= -4.5e-296)
		tmp = t_2;
	elseif (a <= 3.65e-267)
		tmp = t_1;
	elseif (a <= 7.8e-234)
		tmp = t_2;
	elseif (a <= 1.5e-145)
		tmp = t_1;
	elseif (a <= 1.26e-108)
		tmp = t_2;
	elseif (a <= 3.3e-34)
		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 / ((z - t) / y);
	t_2 = 60.0 * (x / (z - t));
	tmp = 0.0;
	if (a <= -5.6e+31)
		tmp = a * 120.0;
	elseif (a <= -4.5e-296)
		tmp = t_2;
	elseif (a <= 3.65e-267)
		tmp = t_1;
	elseif (a <= 7.8e-234)
		tmp = t_2;
	elseif (a <= 1.5e-145)
		tmp = t_1;
	elseif (a <= 1.26e-108)
		tmp = t_2;
	elseif (a <= 3.3e-34)
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e+31], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.5e-296], t$95$2, If[LessEqual[a, 3.65e-267], t$95$1, If[LessEqual[a, 7.8e-234], t$95$2, If[LessEqual[a, 1.5e-145], t$95$1, If[LessEqual[a, 1.26e-108], t$95$2, If[LessEqual[a, 3.3e-34], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-296}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.65 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{-234}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-145}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.26 \cdot 10^{-108}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-34}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 4: 57.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-60}{\frac{z - t}{y}}\\ t_2 := 60 \cdot \frac{x}{z - t}\\ \mathbf{if}\;a \leq -5.8 \cdot 10^{+31}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-294}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-239}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-36}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ -60.0 (/ (- z t) y))) (t_2 (* 60.0 (/ x (- z t)))))
   (if (<= a -5.8e+31)
     (* a 120.0)
     (if (<= a -1.15e-294)
       t_2
       (if (<= a 4.4e-268)
         t_1
         (if (<= a 9e-239)
           t_2
           (if (<= a 1.2e-155)
             t_1
             (if (<= a 7.4e-103)
               t_2
               (if (<= a 2.1e-36) (/ (* y -60.0) (- z t)) (* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 / ((z - t) / y);
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -5.8e+31) {
		tmp = a * 120.0;
	} else if (a <= -1.15e-294) {
		tmp = t_2;
	} else if (a <= 4.4e-268) {
		tmp = t_1;
	} else if (a <= 9e-239) {
		tmp = t_2;
	} else if (a <= 1.2e-155) {
		tmp = t_1;
	} else if (a <= 7.4e-103) {
		tmp = t_2;
	} else if (a <= 2.1e-36) {
		tmp = (y * -60.0) / (z - t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-60.0d0) / ((z - t) / y)
    t_2 = 60.0d0 * (x / (z - t))
    if (a <= (-5.8d+31)) then
        tmp = a * 120.0d0
    else if (a <= (-1.15d-294)) then
        tmp = t_2
    else if (a <= 4.4d-268) then
        tmp = t_1
    else if (a <= 9d-239) then
        tmp = t_2
    else if (a <= 1.2d-155) then
        tmp = t_1
    else if (a <= 7.4d-103) then
        tmp = t_2
    else if (a <= 2.1d-36) then
        tmp = (y * (-60.0d0)) / (z - t)
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 / ((z - t) / y);
	double t_2 = 60.0 * (x / (z - t));
	double tmp;
	if (a <= -5.8e+31) {
		tmp = a * 120.0;
	} else if (a <= -1.15e-294) {
		tmp = t_2;
	} else if (a <= 4.4e-268) {
		tmp = t_1;
	} else if (a <= 9e-239) {
		tmp = t_2;
	} else if (a <= 1.2e-155) {
		tmp = t_1;
	} else if (a <= 7.4e-103) {
		tmp = t_2;
	} else if (a <= 2.1e-36) {
		tmp = (y * -60.0) / (z - t);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 / ((z - t) / y)
	t_2 = 60.0 * (x / (z - t))
	tmp = 0
	if a <= -5.8e+31:
		tmp = a * 120.0
	elif a <= -1.15e-294:
		tmp = t_2
	elif a <= 4.4e-268:
		tmp = t_1
	elif a <= 9e-239:
		tmp = t_2
	elif a <= 1.2e-155:
		tmp = t_1
	elif a <= 7.4e-103:
		tmp = t_2
	elif a <= 2.1e-36:
		tmp = (y * -60.0) / (z - t)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 / Float64(Float64(z - t) / y))
	t_2 = Float64(60.0 * Float64(x / Float64(z - t)))
	tmp = 0.0
	if (a <= -5.8e+31)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.15e-294)
		tmp = t_2;
	elseif (a <= 4.4e-268)
		tmp = t_1;
	elseif (a <= 9e-239)
		tmp = t_2;
	elseif (a <= 1.2e-155)
		tmp = t_1;
	elseif (a <= 7.4e-103)
		tmp = t_2;
	elseif (a <= 2.1e-36)
		tmp = Float64(Float64(y * -60.0) / Float64(z - t));
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 / ((z - t) / y);
	t_2 = 60.0 * (x / (z - t));
	tmp = 0.0;
	if (a <= -5.8e+31)
		tmp = a * 120.0;
	elseif (a <= -1.15e-294)
		tmp = t_2;
	elseif (a <= 4.4e-268)
		tmp = t_1;
	elseif (a <= 9e-239)
		tmp = t_2;
	elseif (a <= 1.2e-155)
		tmp = t_1;
	elseif (a <= 7.4e-103)
		tmp = t_2;
	elseif (a <= 2.1e-36)
		tmp = (y * -60.0) / (z - t);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.8e+31], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.15e-294], t$95$2, If[LessEqual[a, 4.4e-268], t$95$1, If[LessEqual[a, 9e-239], t$95$2, If[LessEqual[a, 1.2e-155], t$95$1, If[LessEqual[a, 7.4e-103], t$95$2, If[LessEqual[a, 2.1e-36], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.15 \cdot 10^{-294}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 4.4 \cdot 10^{-268}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9 \cdot 10^{-239}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-155}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 7.4 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 5: 83.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-145}:\\
\;\;\;\;t_1 \cdot x + a \cdot 120\\

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-167}:\\
\;\;\;\;t_1 \cdot \left(x - y\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 6: 83.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \mathbf{if}\;z \leq -2.45 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-146}:\\ \;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-162}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 75000:\\ \;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{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 (/ (- x y) z)))))
   (if (<= z -2.45e+17)
     t_1
     (if (<= z -7.4e-146)
       (+ (* (/ 60.0 (- z t)) x) (* a 120.0))
       (if (<= z -3.7e-162)
         (* 60.0 (/ (- x y) (- z t)))
         (if (<= z 75000.0) (+ (* a 120.0) (* (- x y) (/ -60.0 t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a * 120.0) + (60.0 * ((x - y) / z));
	double tmp;
	if (z <= -2.45e+17) {
		tmp = t_1;
	} else if (z <= -7.4e-146) {
		tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
	} else if (z <= -3.7e-162) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (z <= 75000.0) {
		tmp = (a * 120.0) + ((x - y) * (-60.0 / 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 * ((x - y) / z))
    if (z <= (-2.45d+17)) then
        tmp = t_1
    else if (z <= (-7.4d-146)) then
        tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
    else if (z <= (-3.7d-162)) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else if (z <= 75000.0d0) then
        tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / 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 * ((x - y) / z));
	double tmp;
	if (z <= -2.45e+17) {
		tmp = t_1;
	} else if (z <= -7.4e-146) {
		tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
	} else if (z <= -3.7e-162) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (z <= 75000.0) {
		tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a * 120.0) + (60.0 * ((x - y) / z))
	tmp = 0
	if z <= -2.45e+17:
		tmp = t_1
	elif z <= -7.4e-146:
		tmp = ((60.0 / (z - t)) * x) + (a * 120.0)
	elif z <= -3.7e-162:
		tmp = 60.0 * ((x - y) / (z - t))
	elif z <= 75000.0:
		tmp = (a * 120.0) + ((x - y) * (-60.0 / 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(Float64(x - y) / z)))
	tmp = 0.0
	if (z <= -2.45e+17)
		tmp = t_1;
	elseif (z <= -7.4e-146)
		tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0));
	elseif (z <= -3.7e-162)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	elseif (z <= 75000.0)
		tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / 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 * ((x - y) / z));
	tmp = 0.0;
	if (z <= -2.45e+17)
		tmp = t_1;
	elseif (z <= -7.4e-146)
		tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
	elseif (z <= -3.7e-162)
		tmp = 60.0 * ((x - y) / (z - t));
	elseif (z <= 75000.0)
		tmp = (a * 120.0) + ((x - y) * (-60.0 / 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[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.45e+17], t$95$1, If[LessEqual[z, -7.4e-146], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-162], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 75000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 7: 83.4% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 8: 76.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -1.04 \cdot 10^{-88} \lor \neg \left(z \leq 84000\right):\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 9: 87.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 10: 87.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+127}:\\
\;\;\;\;\frac{60}{\left(z - t\right) \cdot \frac{1}{x}} + a \cdot 120\\

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 11: 73.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+70} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+83}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 12: 57.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -3400000000:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-167}:\\ \;\;\;\;\frac{x}{t \cdot -0.016666666666666666}\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))))
   (if (<= a -3400000000.0)
     (* a 120.0)
     (if (<= a -2.8e-147)
       t_1
       (if (<= a -4.8e-167)
         (/ x (* t -0.016666666666666666))
         (if (<= a 2.25e-35) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -3400000000.0) {
		tmp = a * 120.0;
	} else if (a <= -2.8e-147) {
		tmp = t_1;
	} else if (a <= -4.8e-167) {
		tmp = x / (t * -0.016666666666666666);
	} else if (a <= 2.25e-35) {
		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) * (y / (z - t))
    if (a <= (-3400000000.0d0)) then
        tmp = a * 120.0d0
    else if (a <= (-2.8d-147)) then
        tmp = t_1
    else if (a <= (-4.8d-167)) then
        tmp = x / (t * (-0.016666666666666666d0))
    else if (a <= 2.25d-35) 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 * (y / (z - t));
	double tmp;
	if (a <= -3400000000.0) {
		tmp = a * 120.0;
	} else if (a <= -2.8e-147) {
		tmp = t_1;
	} else if (a <= -4.8e-167) {
		tmp = x / (t * -0.016666666666666666);
	} else if (a <= 2.25e-35) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	tmp = 0
	if a <= -3400000000.0:
		tmp = a * 120.0
	elif a <= -2.8e-147:
		tmp = t_1
	elif a <= -4.8e-167:
		tmp = x / (t * -0.016666666666666666)
	elif a <= 2.25e-35:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (a <= -3400000000.0)
		tmp = Float64(a * 120.0);
	elseif (a <= -2.8e-147)
		tmp = t_1;
	elseif (a <= -4.8e-167)
		tmp = Float64(x / Float64(t * -0.016666666666666666));
	elseif (a <= 2.25e-35)
		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 * (y / (z - t));
	tmp = 0.0;
	if (a <= -3400000000.0)
		tmp = a * 120.0;
	elseif (a <= -2.8e-147)
		tmp = t_1;
	elseif (a <= -4.8e-167)
		tmp = x / (t * -0.016666666666666666);
	elseif (a <= 2.25e-35)
		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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3400000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.8e-147], t$95$1, If[LessEqual[a, -4.8e-167], N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.25e-35], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-167}:\\
\;\;\;\;\frac{x}{t \cdot -0.016666666666666666}\\

\mathbf{elif}\;a \leq 2.25 \cdot 10^{-35}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 13: 81.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-162} \lor \neg \left(z \leq 4400000\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 14: 88.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 15: 88.8% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 16: 73.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+67} \lor \neg \left(a \leq 3.7 \cdot 10^{+81}\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.2e+67) (not (<= a 3.7e+81)))
   (* 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.2e+67) || !(a <= 3.7e+81)) {
		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.2d+67)) .or. (.not. (a <= 3.7d+81))) 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.2e+67) || !(a <= 3.7e+81)) {
		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.2e+67) or not (a <= 3.7e+81):
		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.2e+67) || !(a <= 3.7e+81))
		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.2e+67) || ~((a <= 3.7e+81)))
		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.2e+67], N[Not[LessEqual[a, 3.7e+81]], $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.2 \cdot 10^{+67} \lor \neg \left(a \leq 3.7 \cdot 10^{+81}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 17: 99.8% accurate, 1.0× speedup?

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

\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 18: 50.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-217} \lor \neg \left(t \leq 2.8 \cdot 10^{-216}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 19: 50.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-216} \lor \neg \left(t \leq 10^{-218}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 20: 50.5% accurate, 4.3× speedup?

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

\\
a \cdot 120
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. 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 2024003 
(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)))