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

Percentage Accurate: 99.3% → 99.8%
Time: 13.8s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Derivation
  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. Final simplification99.8%

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

Alternative 2: 89.2% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+179} \lor \neg \left(y \leq 8.5 \cdot 10^{+220}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.3e57 or 5.2000000000000001e73 < y < 7.0000000000000003e179 or 8.4999999999999996e220 < y

    1. Initial program 97.7%

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

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

    if -1.3e57 < y < 5.2000000000000001e73

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

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

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

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

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

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

    if 7.0000000000000003e179 < y < 8.4999999999999996e220

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      2. metadata-eval86.0%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/85.8%

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

        \[\leadsto \left(x - y\right) \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*86.1%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval86.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+57}:\\ \;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+179} \lor \neg \left(y \leq 8.5 \cdot 10^{+220}\right):\\ \;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \end{array} \]

Alternative 3: 75.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{+75} \lor \neg \left(a \leq -7.6 \cdot 10^{+32}\right) \land a \leq 0.5:\\ \;\;\;\;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.3e+97)
   (* a 120.0)
   (if (or (<= a -6.2e+75) (and (not (<= a -7.6e+32)) (<= a 0.5)))
     (* 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.3e+97) {
		tmp = a * 120.0;
	} else if ((a <= -6.2e+75) || (!(a <= -7.6e+32) && (a <= 0.5))) {
		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.3d+97)) then
        tmp = a * 120.0d0
    else if ((a <= (-6.2d+75)) .or. (.not. (a <= (-7.6d+32))) .and. (a <= 0.5d0)) 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.3e+97) {
		tmp = a * 120.0;
	} else if ((a <= -6.2e+75) || (!(a <= -7.6e+32) && (a <= 0.5))) {
		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.3e+97:
		tmp = a * 120.0
	elif (a <= -6.2e+75) or (not (a <= -7.6e+32) and (a <= 0.5)):
		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.3e+97)
		tmp = Float64(a * 120.0);
	elseif ((a <= -6.2e+75) || (!(a <= -7.6e+32) && (a <= 0.5)))
		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.3e+97)
		tmp = a * 120.0;
	elseif ((a <= -6.2e+75) || (~((a <= -7.6e+32)) && (a <= 0.5)))
		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.3e+97], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[a, -6.2e+75], And[N[Not[LessEqual[a, -7.6e+32]], $MachinePrecision], LessEqual[a, 0.5]]], 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.3 \cdot 10^{+97}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -6.2 \cdot 10^{+75} \lor \neg \left(a \leq -7.6 \cdot 10^{+32}\right) \land a \leq 0.5:\\
\;\;\;\;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.30000000000000006e97 or -6.2000000000000002e75 < a < -7.6000000000000006e32 or 0.5 < a

    1. Initial program 98.3%

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

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

    if -2.30000000000000006e97 < a < -6.2000000000000002e75 or -7.6000000000000006e32 < a < 0.5

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{+75} \lor \neg \left(a \leq -7.6 \cdot 10^{+32}\right) \land a \leq 0.5:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 4: 74.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{+75}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{+32}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 0.145:\\ \;\;\;\;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 -1.12e+97)
   (* a 120.0)
   (if (<= a -4.3e+75)
     (* (- x y) (/ 60.0 (- z t)))
     (if (<= a -2.95e+32)
       (* a 120.0)
       (if (<= a 0.145) (* 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 <= -1.12e+97) {
		tmp = a * 120.0;
	} else if (a <= -4.3e+75) {
		tmp = (x - y) * (60.0 / (z - t));
	} else if (a <= -2.95e+32) {
		tmp = a * 120.0;
	} else if (a <= 0.145) {
		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 <= (-1.12d+97)) then
        tmp = a * 120.0d0
    else if (a <= (-4.3d+75)) then
        tmp = (x - y) * (60.0d0 / (z - t))
    else if (a <= (-2.95d+32)) then
        tmp = a * 120.0d0
    else if (a <= 0.145d0) 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 <= -1.12e+97) {
		tmp = a * 120.0;
	} else if (a <= -4.3e+75) {
		tmp = (x - y) * (60.0 / (z - t));
	} else if (a <= -2.95e+32) {
		tmp = a * 120.0;
	} else if (a <= 0.145) {
		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 <= -1.12e+97:
		tmp = a * 120.0
	elif a <= -4.3e+75:
		tmp = (x - y) * (60.0 / (z - t))
	elif a <= -2.95e+32:
		tmp = a * 120.0
	elif a <= 0.145:
		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 <= -1.12e+97)
		tmp = Float64(a * 120.0);
	elseif (a <= -4.3e+75)
		tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)));
	elseif (a <= -2.95e+32)
		tmp = Float64(a * 120.0);
	elseif (a <= 0.145)
		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 <= -1.12e+97)
		tmp = a * 120.0;
	elseif (a <= -4.3e+75)
		tmp = (x - y) * (60.0 / (z - t));
	elseif (a <= -2.95e+32)
		tmp = a * 120.0;
	elseif (a <= 0.145)
		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, -1.12e+97], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.3e+75], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.95e+32], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 0.145], 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 -1.12 \cdot 10^{+97}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;a \leq -2.95 \cdot 10^{+32}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.12e97 or -4.3000000000000001e75 < a < -2.94999999999999983e32 or 0.14499999999999999 < a

    1. Initial program 98.3%

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

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

    if -1.12e97 < a < -4.3000000000000001e75

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      2. metadata-eval74.8%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/74.9%

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      5. *-commutative74.9%

        \[\leadsto \left(x - y\right) \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*74.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval74.9%

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

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

    if -2.94999999999999983e32 < a < 0.14499999999999999

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{+75}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{+32}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 0.145:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 5: 73.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -6 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.65 \cdot 10^{+32}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.04999999999999998e160 or -5.9999999999999999e57 < a < -2.65e32

    1. Initial program 97.1%

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

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

    if -1.04999999999999998e160 < a < -5.9999999999999999e57 or 4.40000000000000018e-40 < a

    1. Initial program 99.0%

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

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

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

    if -2.65e32 < a < 4.40000000000000018e-40

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      2. metadata-eval76.5%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/76.4%

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

        \[\leadsto \left(x - y\right) \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*76.5%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval76.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{+160}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6 \cdot 10^{+57}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{+32}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-40}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 6: 73.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -6.6 \cdot 10^{+75}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.9 \cdot 10^{+24}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.79999999999999941e157 or -6.59999999999999996e75 < a < -3.8999999999999998e24

    1. Initial program 97.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 z around inf 90.2%

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

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

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

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

    if -7.79999999999999941e157 < a < -6.59999999999999996e75 or 1.35e-39 < a

    1. Initial program 98.9%

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

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

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

    if -3.8999999999999998e24 < a < 1.35e-39

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      2. metadata-eval76.6%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/76.5%

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      5. *-commutative76.5%

        \[\leadsto \left(x - y\right) \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*76.6%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval76.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+157}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{+75}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{+24}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-39}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 7: 73.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -2.65 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{+32}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.8999999999999999e160 or -2.64999999999999989e79 < a < -3.1999999999999999e32

    1. Initial program 97.6%

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

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

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

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

      \[\leadsto 120 \cdot a + \color{blue}{-60 \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. *-commutative82.8%

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

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

    if -2.8999999999999999e160 < a < -2.64999999999999989e79 or 4.99999999999999965e-40 < a

    1. Initial program 98.9%

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

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

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

    if -3.1999999999999999e32 < a < 4.99999999999999965e-40

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} \]
      2. metadata-eval76.5%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot 1}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. associate-*r/76.4%

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

        \[\leadsto \left(x - y\right) \cdot \frac{1}{\color{blue}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      6. associate-/r*76.5%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{\frac{1}{0.016666666666666666}}{z - t}} \]
      7. metadata-eval76.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+160}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{+79}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{+32}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-40}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \end{array} \]

Alternative 8: 76.8% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.60000000000000004e49

    1. Initial program 97.3%

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

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

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

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

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

    if -4.60000000000000004e49 < z < -1.1e-14

    1. Initial program 99.6%

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

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

    if -1.1e-14 < z < 2.99999999999999974e-4

    1. Initial program 99.8%

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

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

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

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

    if 2.99999999999999974e-4 < z

    1. Initial program 98.6%

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

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

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

        \[\leadsto 120 \cdot a + \color{blue}{\frac{y}{z} \cdot -60} \]
    7. Simplified76.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+49}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-14}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;z \leq 0.0003:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 9: 57.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -5 \cdot 10^{+155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+182}:\\ \;\;\;\;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 -5e+155)
     t_1
     (if (<= y -2.25e-61)
       (* a 120.0)
       (if (<= y -3.1e-83)
         (* -60.0 (/ x t))
         (if (<= y 1.65e+182) (* 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 <= -5e+155) {
		tmp = t_1;
	} else if (y <= -2.25e-61) {
		tmp = a * 120.0;
	} else if (y <= -3.1e-83) {
		tmp = -60.0 * (x / t);
	} else if (y <= 1.65e+182) {
		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 <= (-5d+155)) then
        tmp = t_1
    else if (y <= (-2.25d-61)) then
        tmp = a * 120.0d0
    else if (y <= (-3.1d-83)) then
        tmp = (-60.0d0) * (x / t)
    else if (y <= 1.65d+182) 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 <= -5e+155) {
		tmp = t_1;
	} else if (y <= -2.25e-61) {
		tmp = a * 120.0;
	} else if (y <= -3.1e-83) {
		tmp = -60.0 * (x / t);
	} else if (y <= 1.65e+182) {
		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 <= -5e+155:
		tmp = t_1
	elif y <= -2.25e-61:
		tmp = a * 120.0
	elif y <= -3.1e-83:
		tmp = -60.0 * (x / t)
	elif y <= 1.65e+182:
		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 <= -5e+155)
		tmp = t_1;
	elseif (y <= -2.25e-61)
		tmp = Float64(a * 120.0);
	elseif (y <= -3.1e-83)
		tmp = Float64(-60.0 * Float64(x / t));
	elseif (y <= 1.65e+182)
		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 <= -5e+155)
		tmp = t_1;
	elseif (y <= -2.25e-61)
		tmp = a * 120.0;
	elseif (y <= -3.1e-83)
		tmp = -60.0 * (x / t);
	elseif (y <= 1.65e+182)
		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, -5e+155], t$95$1, If[LessEqual[y, -2.25e-61], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -3.1e-83], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+182], 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 -5 \cdot 10^{+155}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+182}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.9999999999999999e155 or 1.65e182 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

    if -4.9999999999999999e155 < y < -2.25e-61 or -3.09999999999999992e-83 < y < 1.65e182

    1. Initial program 99.3%

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

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

    if -2.25e-61 < y < -3.09999999999999992e-83

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    8. Simplified83.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+155}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+182}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 10: 56.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{+155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+28}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -6.9 \cdot 10^{-84}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+182}:\\ \;\;\;\;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.55e+155)
     t_1
     (if (<= y -1.3e+28)
       (* a 120.0)
       (if (<= y -6.9e-84)
         (* x (/ 60.0 (- z t)))
         (if (<= y 1.08e+182) (* 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.55e+155) {
		tmp = t_1;
	} else if (y <= -1.3e+28) {
		tmp = a * 120.0;
	} else if (y <= -6.9e-84) {
		tmp = x * (60.0 / (z - t));
	} else if (y <= 1.08e+182) {
		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.55d+155)) then
        tmp = t_1
    else if (y <= (-1.3d+28)) then
        tmp = a * 120.0d0
    else if (y <= (-6.9d-84)) then
        tmp = x * (60.0d0 / (z - t))
    else if (y <= 1.08d+182) 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.55e+155) {
		tmp = t_1;
	} else if (y <= -1.3e+28) {
		tmp = a * 120.0;
	} else if (y <= -6.9e-84) {
		tmp = x * (60.0 / (z - t));
	} else if (y <= 1.08e+182) {
		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.55e+155:
		tmp = t_1
	elif y <= -1.3e+28:
		tmp = a * 120.0
	elif y <= -6.9e-84:
		tmp = x * (60.0 / (z - t))
	elif y <= 1.08e+182:
		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.55e+155)
		tmp = t_1;
	elseif (y <= -1.3e+28)
		tmp = Float64(a * 120.0);
	elseif (y <= -6.9e-84)
		tmp = Float64(x * Float64(60.0 / Float64(z - t)));
	elseif (y <= 1.08e+182)
		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.55e+155)
		tmp = t_1;
	elseif (y <= -1.3e+28)
		tmp = a * 120.0;
	elseif (y <= -6.9e-84)
		tmp = x * (60.0 / (z - t));
	elseif (y <= 1.08e+182)
		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.55e+155], t$95$1, If[LessEqual[y, -1.3e+28], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -6.9e-84], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+182], 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.55 \cdot 10^{+155}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.08 \cdot 10^{+182}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.54999999999999995e155 or 1.08000000000000003e182 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

    if -1.54999999999999995e155 < y < -1.3000000000000001e28 or -6.89999999999999987e-84 < y < 1.08000000000000003e182

    1. Initial program 99.2%

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

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

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

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

    if -1.3000000000000001e28 < y < -6.89999999999999987e-84

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} \]
    8. Simplified56.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+155}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+28}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -6.9 \cdot 10^{-84}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+182}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 11: 55.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;y \leq -5.3 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{+30}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+185}:\\ \;\;\;\;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 -5.3e+154)
     t_1
     (if (<= y -1.05e+30)
       (* a 120.0)
       (if (<= y -3.1e-83)
         (* 60.0 (/ x (- z t)))
         (if (<= y 2.5e+185) (* 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 <= -5.3e+154) {
		tmp = t_1;
	} else if (y <= -1.05e+30) {
		tmp = a * 120.0;
	} else if (y <= -3.1e-83) {
		tmp = 60.0 * (x / (z - t));
	} else if (y <= 2.5e+185) {
		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 <= (-5.3d+154)) then
        tmp = t_1
    else if (y <= (-1.05d+30)) then
        tmp = a * 120.0d0
    else if (y <= (-3.1d-83)) then
        tmp = 60.0d0 * (x / (z - t))
    else if (y <= 2.5d+185) 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 <= -5.3e+154) {
		tmp = t_1;
	} else if (y <= -1.05e+30) {
		tmp = a * 120.0;
	} else if (y <= -3.1e-83) {
		tmp = 60.0 * (x / (z - t));
	} else if (y <= 2.5e+185) {
		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 <= -5.3e+154:
		tmp = t_1
	elif y <= -1.05e+30:
		tmp = a * 120.0
	elif y <= -3.1e-83:
		tmp = 60.0 * (x / (z - t))
	elif y <= 2.5e+185:
		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 <= -5.3e+154)
		tmp = t_1;
	elseif (y <= -1.05e+30)
		tmp = Float64(a * 120.0);
	elseif (y <= -3.1e-83)
		tmp = Float64(60.0 * Float64(x / Float64(z - t)));
	elseif (y <= 2.5e+185)
		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 <= -5.3e+154)
		tmp = t_1;
	elseif (y <= -1.05e+30)
		tmp = a * 120.0;
	elseif (y <= -3.1e-83)
		tmp = 60.0 * (x / (z - t));
	elseif (y <= 2.5e+185)
		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, -5.3e+154], t$95$1, If[LessEqual[y, -1.05e+30], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -3.1e-83], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+185], 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 -5.3 \cdot 10^{+154}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.05 \cdot 10^{+30}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+185}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.30000000000000024e154 or 2.49999999999999995e185 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

    if -5.30000000000000024e154 < y < -1.05e30 or -3.09999999999999992e-83 < y < 2.49999999999999995e185

    1. Initial program 99.2%

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

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

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

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

    if -1.05e30 < y < -3.09999999999999992e-83

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.3 \cdot 10^{+154}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{+30}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+185}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 12: 55.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -3.5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+182}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.89999999999999979e154

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999979e154 < y < -3.5e28 or -1.50000000000000005e-83 < y < 7.49999999999999989e182

    1. Initial program 99.2%

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

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

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

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

    if -3.5e28 < y < -1.50000000000000005e-83

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999989e182 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+154}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{+28}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-83}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+182}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 13: 55.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -1.3 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{+186}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.69999999999999983e154

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

    if -4.69999999999999983e154 < y < -1.3000000000000001e28 or -3.09999999999999992e-83 < y < 1.45e186

    1. Initial program 99.2%

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

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

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

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

    if -1.3000000000000001e28 < y < -3.09999999999999992e-83

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    8. Simplified56.7%

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

    if 1.45e186 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+154}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+28}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;\frac{60 \cdot x}{z - t}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+186}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]

Alternative 14: 84.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4999999999999999e-20 or 5.29999999999999968e-33 < z

    1. Initial program 98.3%

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

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

    if -2.4999999999999999e-20 < z < 5.29999999999999968e-33

    1. Initial program 99.8%

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

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

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

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

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

Alternative 15: 84.2% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.5000000000000001e-16

    1. Initial program 97.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 82.7%

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

    if -8.5000000000000001e-16 < z < 0.089999999999999997

    1. Initial program 99.8%

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

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

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

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

    if 0.089999999999999997 < z

    1. Initial program 98.6%

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

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

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

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

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

Alternative 16: 51.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 4.9 \cdot 10^{+185}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.25e-61 or -3.09999999999999992e-83 < y < 4.89999999999999984e185

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

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

    if -2.25e-61 < y < -3.09999999999999992e-83

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    8. Simplified83.7%

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

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

    if 4.89999999999999984e185 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+185}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \end{array} \]

Alternative 17: 51.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-61}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+187}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4000000000000001e-61 or -3.09999999999999992e-83 < y < 1.39999999999999995e187

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

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

    if -2.4000000000000001e-61 < y < -3.09999999999999992e-83

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    8. Simplified83.7%

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

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

    if 1.39999999999999995e187 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{z}{y}}} \]
    9. Simplified44.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+187}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{-60}{\frac{z}{y}}\\ \end{array} \]

Alternative 18: 50.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.25e-61 or -3.09999999999999992e-83 < y

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

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

    if -2.25e-61 < y < -3.09999999999999992e-83

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    8. Simplified83.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]

Alternative 19: 51.4% 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.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 49.1%

    \[\leadsto \color{blue}{120 \cdot a} \]
  5. Final simplification49.1%

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