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

Percentage Accurate: 99.3% → 99.8%
Time: 11.9s
Alternatives: 17
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 17 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(60, \frac{x - y}{z - t}, a \cdot 120\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a)
	return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0))
end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\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. associate-*r/99.8%

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

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

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

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

Alternative 2: 54.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x - y \leq 5 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x - y \leq 2 \cdot 10^{+221}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (-.f64 x y) < -1.00000000000000004e264 or 5.00000000000000003e159 < (-.f64 x y) < 2.0000000000000001e221

    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.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. Step-by-step derivation
      1. associate-/r/99.8%

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

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

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

    if -1.00000000000000004e264 < (-.f64 x y) < 5.00000000000000003e159

    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. Taylor expanded in z around inf 63.5%

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

    if 2.0000000000000001e221 < (-.f64 x y) < 5.00000000000000023e247

    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. Step-by-step derivation
      1. associate-/r/99.9%

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

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

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

    if 5.00000000000000023e247 < (-.f64 x y)

    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. Taylor expanded in z around 0 81.2%

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

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

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

Alternative 3: 54.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+264}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\

\mathbf{elif}\;x - y \leq 5 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (-.f64 x y) < -1.00000000000000004e264

    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. Step-by-step derivation
      1. associate-/r/100.0%

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    8. Simplified65.0%

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

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

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
    10. Applied egg-rr65.0%

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

    if -1.00000000000000004e264 < (-.f64 x y) < 5.00000000000000003e159

    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. Taylor expanded in z around inf 63.5%

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

    if 5.00000000000000003e159 < (-.f64 x y) < 2.0000000000000001e221

    1. Initial program 99.4%

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

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

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

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

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

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

    if 2.0000000000000001e221 < (-.f64 x y) < 5.00000000000000023e247

    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. Step-by-step derivation
      1. associate-/r/99.9%

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

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

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

    if 5.00000000000000023e247 < (-.f64 x y)

    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. Taylor expanded in z around 0 81.2%

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

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

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

Alternative 4: 82.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -1e-82 or 2.99999999999999994e-16 < (*.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.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. Taylor expanded in x around 0 86.2%

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

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

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

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

    if -1e-82 < (*.f64 a 120) < 2.99999999999999994e-16

    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.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. Taylor expanded in a around 0 84.5%

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

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

Alternative 5: 77.4% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.50000000000000064e60 or 2.3000000000000001e209 < z

    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.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. Taylor expanded in x around inf 89.9%

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

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

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

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

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

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

    if -8.50000000000000064e60 < z < 6.5e-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. Taylor expanded in z around 0 80.8%

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

    if 6.5e-24 < z < 9.20000000000000018e44

    1. Initial program 99.5%

      \[\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. Taylor expanded in a around 0 89.8%

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

    if 9.20000000000000018e44 < z < 2.3000000000000001e209

    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. Step-by-step derivation
      1. associate-/r/99.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+60}:\\ \;\;\;\;a \cdot 120 + \frac{x}{\frac{z}{60}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-24}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+44}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+209}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{x}{\frac{z}{60}}\\ \end{array} \]

Alternative 6: 74.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -0.0001:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-15}:\\ \;\;\;\;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) -0.0001)
   (* a 120.0)
   (if (<= (* a 120.0) 2e-15) (* 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) <= -0.0001) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 2e-15) {
		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) <= (-0.0001d0)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= 2d-15) 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) <= -0.0001) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= 2e-15) {
		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) <= -0.0001:
		tmp = a * 120.0
	elif (a * 120.0) <= 2e-15:
		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) <= -0.0001)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= 2e-15)
		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) <= -0.0001)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= 2e-15)
		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], -0.0001], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-15], 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 -0.0001:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -1.00000000000000005e-4 or 2.0000000000000002e-15 < (*.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.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. Taylor expanded in z around inf 78.2%

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

    if -1.00000000000000005e-4 < (*.f64 a 120) < 2.0000000000000002e-15

    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. Taylor expanded in a around 0 80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -0.0001:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-15}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 7: 90.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+39} \lor \neg \left(y \leq 8 \cdot 10^{+69}\right):\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999993e39 or 8.0000000000000006e69 < y

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in x around 0 92.5%

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

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

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

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

    if -3.19999999999999993e39 < y < 8.0000000000000006e69

    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.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. Taylor expanded in x around inf 95.5%

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

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

Alternative 8: 54.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+264}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

\mathbf{elif}\;x - y \leq 2 \cdot 10^{+168}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 x y) < -1.00000000000000004e264

    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. Step-by-step derivation
      1. associate-/r/100.0%

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

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

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

    if -1.00000000000000004e264 < (-.f64 x y) < 1.9999999999999999e168

    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. Taylor expanded in z around inf 62.7%

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

    if 1.9999999999999999e168 < (-.f64 x y)

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Taylor expanded in z around 0 71.9%

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

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

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

Alternative 9: 90.3% accurate, 0.9× speedup?

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

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

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

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


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

    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. Taylor expanded in x around 0 91.8%

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

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

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

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

    if -1.59999999999999993e38 < y < 9.6000000000000007e69

    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.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. Taylor expanded in x around inf 95.5%

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

    if 9.6000000000000007e69 < y

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+38}:\\ \;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+69}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \end{array} \]

Alternative 10: 99.8% accurate, 1.0× speedup?

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

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

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

      \[\leadsto \color{blue}{\frac{60}{\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. Step-by-step derivation
    1. associate-/r/99.8%

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

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

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

Alternative 11: 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. Final simplification99.8%

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

Alternative 12: 99.8% accurate, 1.0× speedup?

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

\\
a \cdot 120 + \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}
\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. Step-by-step derivation
    1. associate-/r/99.8%

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

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

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

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

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

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

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

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

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

Alternative 13: 56.9% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.05e120 or 1.3e262 < y

    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.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. Step-by-step derivation
      1. associate-/r/99.7%

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

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

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

    if -2.05e120 < y < 1.3e262

    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. Taylor expanded in z around inf 58.9%

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

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

Alternative 14: 53.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+168} \lor \neg \left(y \leq 1.3 \cdot 10^{+262}\right):\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.1999999999999999e168 or 1.3e262 < y

    1. Initial program 99.7%

      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
    2. Step-by-step derivation
      1. associate-/l*99.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. Step-by-step derivation
      1. associate-/r/99.8%

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

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

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

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

    if -7.1999999999999999e168 < y < 1.3e262

    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. Taylor expanded in z around inf 57.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+168} \lor \neg \left(y \leq 1.3 \cdot 10^{+262}\right):\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 15: 53.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+169}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+262}:\\
\;\;\;\;a \cdot 120\\

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


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

    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.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. Step-by-step derivation
      1. associate-/r/99.8%

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

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

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

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

    if -1.02000000000000005e169 < y < 5.1999999999999998e262

    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. Taylor expanded in z around inf 57.0%

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

    if 5.1999999999999998e262 < y

    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.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. Step-by-step derivation
      1. associate-/r/100.0%

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
    8. Simplified100.0%

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

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

        \[\leadsto \color{blue}{\frac{-60}{z - t} \cdot y} \]
    10. Applied egg-rr100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{+169}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+262}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{60}{t}\\ \end{array} \]

Alternative 16: 51.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+161}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.6999999999999998e161

    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. Taylor expanded in z around inf 55.2%

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

    if 2.6999999999999998e161 < x

    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. Taylor expanded in z around 0 73.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.7 \cdot 10^{+161}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]

Alternative 17: 51.7% accurate, 4.3× speedup?

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

\\
a \cdot 120
\end{array}
Derivation
  1. Initial program 99.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. Taylor expanded in z around inf 51.3%

    \[\leadsto \color{blue}{120 \cdot a} \]
  5. Final simplification51.3%

    \[\leadsto a \cdot 120 \]

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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