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

Percentage Accurate: 99.5% → 99.8%
Time: 15.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.5% 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{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (fma a 120.0 (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
	return fma(a, 120.0, ((x - y) / ((z - t) * 0.016666666666666666)));
}
function code(x, y, z, t, a)
	return fma(a, 120.0, Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)))
end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.7% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-186} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-62}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -9.9999999999999992e-72 or -9.99999999999999978e-138 < (*.f64 a 120) < -9.9999999999999991e-187 or 5.0000000000000002e-62 < (*.f64 a 120)

    1. Initial program 98.8%

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

        \[\leadsto \color{blue}{\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 86.4%

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

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

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

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

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

    if -9.9999999999999992e-72 < (*.f64 a 120) < -9.99999999999999978e-138

    1. Initial program 99.7%

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

        \[\leadsto \color{blue}{\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. Taylor expanded in a around 0 77.1%

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

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

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    5. Step-by-step derivation
      1. metadata-eval85.1%

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} \]
      2. times-frac85.2%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      3. *-un-lft-identity85.2%

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

        \[\leadsto \frac{x - y}{\color{blue}{\left(z - t\right) \cdot 0.016666666666666666}} \]
    6. Applied egg-rr85.2%

      \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.4%

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

Alternative 3: 74.5% accurate, 0.6× speedup?

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

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

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

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

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


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

    1. Initial program 98.2%

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

        \[\leadsto \color{blue}{\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 81.6%

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

    if -1.99999999999999986e-39 < (*.f64 a 120) < 1.9999999999999999e-48

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

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

    if 1.9999999999999999e-48 < (*.f64 a 120) < 1e92

    1. Initial program 99.9%

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

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

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

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

Alternative 4: 74.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-48}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\

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

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


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

    1. Initial program 98.2%

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

        \[\leadsto \color{blue}{\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 81.6%

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

    if -1.99999999999999986e-39 < (*.f64 a 120) < 1.9999999999999999e-48

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} \]
      2. times-frac78.2%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      3. *-un-lft-identity78.2%

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

        \[\leadsto \frac{x - y}{\color{blue}{\left(z - t\right) \cdot 0.016666666666666666}} \]
    6. Applied egg-rr78.2%

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

    if 1.9999999999999999e-48 < (*.f64 a 120) < 1e92

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-39}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-48}:\\ \;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{+92}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 74.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{-44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-50} \lor \neg \left(a \leq 1.08 \cdot 10^{+55}\right) \land a \leq 4.8 \cdot 10^{+89}:\\ \;\;\;\;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 -2.25e-44)
   (* a 120.0)
   (if (or (<= a 1.02e-50) (and (not (<= a 1.08e+55)) (<= a 4.8e+89)))
     (* 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 <= -2.25e-44) {
		tmp = a * 120.0;
	} else if ((a <= 1.02e-50) || (!(a <= 1.08e+55) && (a <= 4.8e+89))) {
		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 <= (-2.25d-44)) then
        tmp = a * 120.0d0
    else if ((a <= 1.02d-50) .or. (.not. (a <= 1.08d+55)) .and. (a <= 4.8d+89)) 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 <= -2.25e-44) {
		tmp = a * 120.0;
	} else if ((a <= 1.02e-50) || (!(a <= 1.08e+55) && (a <= 4.8e+89))) {
		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 <= -2.25e-44:
		tmp = a * 120.0
	elif (a <= 1.02e-50) or (not (a <= 1.08e+55) and (a <= 4.8e+89)):
		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 (a <= -2.25e-44)
		tmp = Float64(a * 120.0);
	elseif ((a <= 1.02e-50) || (!(a <= 1.08e+55) && (a <= 4.8e+89)))
		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 <= -2.25e-44)
		tmp = a * 120.0;
	elseif ((a <= 1.02e-50) || (~((a <= 1.08e+55)) && (a <= 4.8e+89)))
		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[a, -2.25e-44], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[a, 1.02e-50], And[N[Not[LessEqual[a, 1.08e+55]], $MachinePrecision], LessEqual[a, 4.8e+89]]], 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 \leq -2.25 \cdot 10^{-44}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-50} \lor \neg \left(a \leq 1.08 \cdot 10^{+55}\right) \land a \leq 4.8 \cdot 10^{+89}:\\
\;\;\;\;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 a < -2.2499999999999999e-44 or 1.0199999999999999e-50 < a < 1.08000000000000004e55 or 4.80000000000000009e89 < a

    1. Initial program 98.5%

      \[\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.4%

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

    if -2.2499999999999999e-44 < a < 1.0199999999999999e-50 or 1.08000000000000004e55 < a < 4.80000000000000009e89

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{-44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-50} \lor \neg \left(a \leq 1.08 \cdot 10^{+55}\right) \land a \leq 4.8 \cdot 10^{+89}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 6: 74.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{if}\;z \leq -2.45 \cdot 10^{+171}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-19}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-242}:\\ \;\;\;\;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) (* x (/ 60.0 (- z t))))))
   (if (<= z -2.45e+171)
     t_1
     (if (<= z -3.1e-19)
       (* 60.0 (/ (- x y) (- z t)))
       (if (<= z 5.7e-242) (+ (* 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) + (x * (60.0 / (z - t)));
	double tmp;
	if (z <= -2.45e+171) {
		tmp = t_1;
	} else if (z <= -3.1e-19) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (z <= 5.7e-242) {
		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) + (x * (60.0d0 / (z - t)))
    if (z <= (-2.45d+171)) then
        tmp = t_1
    else if (z <= (-3.1d-19)) then
        tmp = 60.0d0 * ((x - y) / (z - t))
    else if (z <= 5.7d-242) 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) + (x * (60.0 / (z - t)));
	double tmp;
	if (z <= -2.45e+171) {
		tmp = t_1;
	} else if (z <= -3.1e-19) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else if (z <= 5.7e-242) {
		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) + (x * (60.0 / (z - t)))
	tmp = 0
	if z <= -2.45e+171:
		tmp = t_1
	elif z <= -3.1e-19:
		tmp = 60.0 * ((x - y) / (z - t))
	elif z <= 5.7e-242:
		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(x * Float64(60.0 / Float64(z - t))))
	tmp = 0.0
	if (z <= -2.45e+171)
		tmp = t_1;
	elseif (z <= -3.1e-19)
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	elseif (z <= 5.7e-242)
		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) + (x * (60.0 / (z - t)));
	tmp = 0.0;
	if (z <= -2.45e+171)
		tmp = t_1;
	elseif (z <= -3.1e-19)
		tmp = 60.0 * ((x - y) / (z - t));
	elseif (z <= 5.7e-242)
		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[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.45e+171], t$95$1, If[LessEqual[z, -3.1e-19], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-242], 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 + x \cdot \frac{60}{z - t}\\
\mathbf{if}\;z \leq -2.45 \cdot 10^{+171}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4499999999999999e171 or 5.70000000000000032e-242 < 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.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 x around inf 88.5%

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

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

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

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

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

    if -2.4499999999999999e171 < z < -3.0999999999999999e-19

    1. Initial program 97.4%

      \[\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 71.4%

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

    if -3.0999999999999999e-19 < z < 5.70000000000000032e-242

    1. Initial program 98.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. 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 z around 0 87.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+171}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-19}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-242}:\\ \;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]

Alternative 7: 57.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 1.85 \cdot 10^{-12}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;y \leq 62000000000000:\\
\;\;\;\;60 \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+163}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4e215 or 3.1999999999999998e163 < y

    1. Initial program 96.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. Step-by-step derivation
      1. associate-*l/96.6%

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} + a \cdot 120 \]
      2. *-un-lft-identity96.6%

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.8%

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

        \[\leadsto \frac{x - y}{\color{blue}{\left(z - t\right) \cdot 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. Taylor expanded in y around inf 66.8%

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

    if -1.4e215 < y < 1.84999999999999999e-12 or 6.2e13 < y < 3.1999999999999998e163

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

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

    if 1.84999999999999999e-12 < y < 6.2e13

    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. associate-*l/99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac100.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+215}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-12}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq 62000000000000:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+163}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 8: 58.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -1 \cdot 10^{-74}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.32 \cdot 10^{-300}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-60}:\\ \;\;\;\;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 -1e-74)
     (* a 120.0)
     (if (<= a -1.8e-139)
       t_1
       (if (<= a -1.32e-300)
         (* 60.0 (/ x (- z t)))
         (if (<= a 4.5e-60) 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 <= -1e-74) {
		tmp = a * 120.0;
	} else if (a <= -1.8e-139) {
		tmp = t_1;
	} else if (a <= -1.32e-300) {
		tmp = 60.0 * (x / (z - t));
	} else if (a <= 4.5e-60) {
		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 <= (-1d-74)) then
        tmp = a * 120.0d0
    else if (a <= (-1.8d-139)) then
        tmp = t_1
    else if (a <= (-1.32d-300)) then
        tmp = 60.0d0 * (x / (z - t))
    else if (a <= 4.5d-60) 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 <= -1e-74) {
		tmp = a * 120.0;
	} else if (a <= -1.8e-139) {
		tmp = t_1;
	} else if (a <= -1.32e-300) {
		tmp = 60.0 * (x / (z - t));
	} else if (a <= 4.5e-60) {
		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 <= -1e-74:
		tmp = a * 120.0
	elif a <= -1.8e-139:
		tmp = t_1
	elif a <= -1.32e-300:
		tmp = 60.0 * (x / (z - t))
	elif a <= 4.5e-60:
		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 <= -1e-74)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.8e-139)
		tmp = t_1;
	elseif (a <= -1.32e-300)
		tmp = Float64(60.0 * Float64(x / Float64(z - t)));
	elseif (a <= 4.5e-60)
		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 <= -1e-74)
		tmp = a * 120.0;
	elseif (a <= -1.8e-139)
		tmp = t_1;
	elseif (a <= -1.32e-300)
		tmp = 60.0 * (x / (z - t));
	elseif (a <= 4.5e-60)
		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, -1e-74], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-139], t$95$1, If[LessEqual[a, -1.32e-300], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e-60], 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 -1 \cdot 10^{-74}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-139}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.99999999999999958e-75 or 4.50000000000000001e-60 < a

    1. Initial program 98.7%

      \[\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 71.7%

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

    if -9.99999999999999958e-75 < a < -1.80000000000000002e-139 or -1.32e-300 < a < 4.50000000000000001e-60

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

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

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

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

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

    if -1.80000000000000002e-139 < a < -1.32e-300

    1. Initial program 99.7%

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

        \[\leadsto \color{blue}{\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.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. Step-by-step derivation
      1. associate-*l/99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-74}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-139}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -1.32 \cdot 10^{-300}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-60}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 9: 88.9% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.2500000000000002e68

    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 x around inf 92.6%

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

    if -3.2500000000000002e68 < x < 1.39999999999999997e-52

    1. Initial program 98.6%

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

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

    if 1.39999999999999997e-52 < 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 x around inf 85.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.25 \cdot 10^{+68}:\\ \;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-52}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\ \end{array} \]

Alternative 10: 90.0% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.8000000000000001e66

    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 x around inf 92.6%

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

    if -2.8000000000000001e66 < x < 7.6e12

    1. Initial program 98.7%

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

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

    if 7.6e12 < 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 x around inf 87.5%

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

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

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

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

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

Alternative 11: 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.1%

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

      \[\leadsto \color{blue}{\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 12: 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.1%

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

      \[\leadsto \color{blue}{\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 13: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
    6. times-frac99.8%

      \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
    7. *-un-lft-identity99.8%

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

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

Alternative 14: 52.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -2.52 \cdot 10^{-290}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 2.15 \cdot 10^{-64}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.1999999999999999e-189 or 2.14999999999999987e-64 < a

    1. Initial program 98.9%

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

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

    if -1.1999999999999999e-189 < a < -2.51999999999999997e-290

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

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

      \[\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. Step-by-step derivation
      1. associate-*l/99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.6%

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

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

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

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

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

    if -2.51999999999999997e-290 < a < 2.14999999999999987e-64

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]
    4. Taylor expanded in y around inf 39.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-189}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.52 \cdot 10^{-290}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-64}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 15: 52.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-288}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-64}:\\
\;\;\;\;\frac{y \cdot 60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.00000000000000042e-190 or 5.60000000000000008e-64 < a

    1. Initial program 98.9%

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

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

    if -9.00000000000000042e-190 < a < -1.8000000000000001e-288

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

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

      \[\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. Step-by-step derivation
      1. associate-*l/99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.6%

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

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

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

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

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

    if -1.8000000000000001e-288 < a < 5.60000000000000008e-64

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} \]
    7. Simplified55.7%

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

      \[\leadsto \frac{\color{blue}{60 \cdot y}}{t} \]
    9. Step-by-step derivation
      1. *-commutative39.2%

        \[\leadsto \frac{\color{blue}{y \cdot 60}}{t} \]
    10. Simplified39.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-190}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-288}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-64}:\\ \;\;\;\;\frac{y \cdot 60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 16: 51.8% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 99.0%

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

        \[\leadsto \color{blue}{\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.1%

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

    if 1.05000000000000006e177 < x

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x - y}{z - t} + a \cdot 120 \]
      6. times-frac99.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(x - y\right)}{0.016666666666666666 \cdot \left(z - t\right)}} + a \cdot 120 \]
      7. *-un-lft-identity99.8%

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

        \[\leadsto \frac{x - y}{\color{blue}{\left(z - t\right) \cdot 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. Taylor expanded in x around inf 69.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.05 \cdot 10^{+177}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \end{array} \]

Alternative 17: 51.1% 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.1%

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

      \[\leadsto \color{blue}{\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 52.2%

    \[\leadsto \color{blue}{120 \cdot a} \]
  5. Final simplification52.2%

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