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

Percentage Accurate: 99.3% → 99.7%
Time: 13.4s
Alternatives: 16
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 16 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.7% 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.1%

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

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

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

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

Alternative 2: 72.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -50000 \lor \neg \left(a \cdot 120 \leq 10^{-100} \lor \neg \left(a \cdot 120 \leq 10^{+55}\right) \land a \cdot 120 \leq 5 \cdot 10^{+99}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -5e4 or 1e-100 < (*.f64 a 120) < 1.00000000000000001e55 or 5.00000000000000008e99 < (*.f64 a 120)

    1. Initial program 99.9%

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

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

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

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

    if -5e4 < (*.f64 a 120) < 1e-100 or 1.00000000000000001e55 < (*.f64 a 120) < 5.00000000000000008e99

    1. Initial program 98.2%

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

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

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

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

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

Alternative 3: 71.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 10^{+55}:\\
\;\;\;\;a \cdot 120\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a 120) < -5e4

    1. Initial program 99.9%

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

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

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

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

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

    if -5e4 < (*.f64 a 120) < 1e-100

    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. Add Preprocessing
    5. Taylor expanded in a around 0 78.7%

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

    if 1e-100 < (*.f64 a 120) < 1.00000000000000001e55

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

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

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

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

    if 1.00000000000000001e55 < (*.f64 a 120) < 9.9999999999999991e211

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

    if 9.9999999999999991e211 < (*.f64 a 120)

    1. Initial program 100.0%

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

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

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

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

Alternative 4: 74.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+31}:\\
\;\;\;\;a \cdot 120\\

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


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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef0.0%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p81.6%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*81.7%

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

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

    if -1.00000000000000001e43 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 9.9999999999999996e30

    1. Initial program 99.9%

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

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

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

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

    if 9.9999999999999996e30 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))

    1. Initial program 98.4%

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

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

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

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

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

Alternative 5: 73.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -50000:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;a \cdot 120 \leq 10^{+55}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -5e4 or 1e-100 < (*.f64 a 120) < 1.00000000000000001e55

    1. Initial program 99.9%

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

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

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

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

    if -5e4 < (*.f64 a 120) < 1e-100

    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. Add Preprocessing
    5. Taylor expanded in a around 0 78.7%

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

    if 1.00000000000000001e55 < (*.f64 a 120)

    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. Add Preprocessing
    5. Taylor expanded in x around inf 90.9%

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

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

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

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

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

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

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

Alternative 6: 56.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{60}{z - t}\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{+164}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq -5.6 \cdot 10^{+79}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{+192}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.05e224 or 1.5e192 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u60.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef48.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Applied egg-rr48.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def60.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p90.3%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*90.2%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Simplified90.2%

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

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

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

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

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

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

    if -3.05e224 < x < -3.1999999999999998e164 or -5.6000000000000002e79 < x < 1.5e192

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

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

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

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

    if -3.1999999999999998e164 < x < -5.6000000000000002e79

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.05 \cdot 10^{+224}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+164}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{+79}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+192}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq -5.6 \cdot 10^{+79}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{+192}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.05e224 or 1.5e192 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u60.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef48.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Applied egg-rr48.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def60.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p90.3%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*90.2%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Simplified90.2%

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

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

    if -3.05e224 < x < -3.4999999999999998e164 or -5.6000000000000002e79 < x < 1.5e192

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

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

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

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

    if -3.4999999999999998e164 < x < -5.6000000000000002e79

    1. Initial program 99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.05 \cdot 10^{+224}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+164}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{+79}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+192}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 56.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.6 \cdot 10^{+164}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;x \leq 3.1 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.3499999999999999e225 or 3.1000000000000001e190 < x

    1. Initial program 99.7%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u60.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef48.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    7. Applied egg-rr48.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def60.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p90.3%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*90.2%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Simplified90.2%

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

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

    if -1.3499999999999999e225 < x < -3.5999999999999999e164 or -2.5e79 < x < 3.1000000000000001e190

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

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

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

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

    if -3.5999999999999999e164 < x < -2.5e79

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef43.0%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def56.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p70.8%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*71.0%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Simplified71.0%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z}} \]
      2. *-commutative60.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+225}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{+164}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{+79}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+190}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 89.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+90} \lor \neg \left(y \leq 5.4 \cdot 10^{+87}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5000000000000001e90 or 5.40000000000000013e87 < y

    1. Initial program 97.8%

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

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

    if -6.5000000000000001e90 < y < 5.40000000000000013e87

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

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

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

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

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

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

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

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

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

Alternative 10: 54.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

    if -1.0000000000000001e230 < (-.f64 x y) < 2.0000000000000001e190

    1. Initial program 99.9%

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

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

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

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

    if 2.0000000000000001e190 < (-.f64 x y)

    1. Initial program 96.6%

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

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

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

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

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

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

Alternative 11: 54.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

    if -1.0000000000000001e230 < (-.f64 x y) < 2.0000000000000001e190

    1. Initial program 99.9%

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

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

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

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

    if 2.0000000000000001e190 < (-.f64 x y)

    1. Initial program 96.6%

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

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

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

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

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

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

Alternative 12: 82.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 93.2%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u44.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef38.0%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def44.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p83.0%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*83.1%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Simplified83.1%

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

    if -3.9999999999999997e175 < y < 5.5000000000000004e146

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

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

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

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

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

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

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

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

    if 5.5000000000000004e146 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 13: 80.6% accurate, 0.6× speedup?

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+92}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - 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 y < -1.7999999999999999e166

    1. Initial program 93.2%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u44.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-udef38.0%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def44.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(60 \cdot \frac{x - y}{z - t}\right)\right)} \]
      2. expm1-log1p83.0%

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      4. associate-/l*83.1%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Simplified83.1%

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

    if -1.7999999999999999e166 < y < 4.80000000000000009e92

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

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

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

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

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

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

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

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

    if 4.80000000000000009e92 < y

    1. Initial program 99.8%

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

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

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

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

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

Alternative 14: 52.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+225} \lor \neg \left(x \leq 3.2 \cdot 10^{+193}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.6999999999999999e225 or 3.20000000000000013e193 < x

    1. Initial program 99.7%

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

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

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

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

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

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

    if -2.6999999999999999e225 < x < 3.20000000000000013e193

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

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

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

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

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

Alternative 15: 51.4% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5000000000000002e177

    1. Initial program 93.2%

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

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

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

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

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

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

    if -6.5000000000000002e177 < y

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+177}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 50.3% accurate, 4.3× speedup?

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

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

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

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

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

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

    \[\leadsto a \cdot 120 \]
  7. Add Preprocessing

Developer target: 99.7% 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 2024026 
(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)))