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

Percentage Accurate: 99.4% → 99.8%
Time: 14.0s
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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Derivation
  1. Initial program 99.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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    2. fma-define99.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. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 72.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot 120 \leq 10^{-75}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.99999999999999976e67 or 1.9999999999999998e-96 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999996e-76

    1. Initial program 98.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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

    if -4.99999999999999976e67 < (*.f64 a #s(literal 120 binary64)) < -5.0000000000000001e-60 or -9.999999999999999e-94 < (*.f64 a #s(literal 120 binary64)) < 1.9999999999999998e-96 or 9.9999999999999996e-76 < (*.f64 a #s(literal 120 binary64)) < 1.99999999999999986e-39

    1. Initial program 98.8%

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

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

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

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

    if -5.0000000000000001e-60 < (*.f64 a #s(literal 120 binary64)) < -9.999999999999999e-94

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999986e-39 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

Alternative 3: 73.6% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+62} \lor \neg \left(a \leq -1.16 \cdot 10^{-64}\right) \land \left(a \leq -1.5 \cdot 10^{-95} \lor \neg \left(a \leq 2.5 \cdot 10^{-92} \lor \neg \left(a \leq 5.8 \cdot 10^{-78}\right) \land a \leq 1.2 \cdot 10^{-8}\right)\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 a < -1.35e62 or -1.15999999999999992e-64 < a < -1.5e-95 or 2.50000000000000006e-92 < a < 5.8000000000000001e-78 or 1.19999999999999999e-8 < a

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

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

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

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

    if -1.35e62 < a < -1.15999999999999992e-64 or -1.5e-95 < a < 2.50000000000000006e-92 or 5.8000000000000001e-78 < a < 1.19999999999999999e-8

    1. Initial program 98.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+62} \lor \neg \left(a \leq -1.16 \cdot 10^{-64}\right) \land \left(a \leq -1.5 \cdot 10^{-95} \lor \neg \left(a \leq 2.5 \cdot 10^{-92} \lor \neg \left(a \leq 5.8 \cdot 10^{-78}\right) \land a \leq 1.2 \cdot 10^{-8}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \leq -2.15 \cdot 10^{+60}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.16 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-95}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-92} \lor \neg \left(a \leq 5.8 \cdot 10^{-78}\right) \land a \leq 1.15 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
   (if (<= a -2.15e+60)
     (* a 120.0)
     (if (<= a -1.16e-64)
       t_1
       (if (<= a -1.55e-95)
         (+ (* a 120.0) (* -60.0 (/ y z)))
         (if (or (<= a 3.9e-92) (and (not (<= a 5.8e-78)) (<= a 1.15e-9)))
           t_1
           (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (a <= -2.15e+60) {
		tmp = a * 120.0;
	} else if (a <= -1.16e-64) {
		tmp = t_1;
	} else if (a <= -1.55e-95) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else if ((a <= 3.9e-92) || (!(a <= 5.8e-78) && (a <= 1.15e-9))) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    if (a <= (-2.15d+60)) then
        tmp = a * 120.0d0
    else if (a <= (-1.16d-64)) then
        tmp = t_1
    else if (a <= (-1.55d-95)) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
    else if ((a <= 3.9d-92) .or. (.not. (a <= 5.8d-78)) .and. (a <= 1.15d-9)) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * ((x - y) / (z - t));
	double tmp;
	if (a <= -2.15e+60) {
		tmp = a * 120.0;
	} else if (a <= -1.16e-64) {
		tmp = t_1;
	} else if (a <= -1.55e-95) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else if ((a <= 3.9e-92) || (!(a <= 5.8e-78) && (a <= 1.15e-9))) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if a <= -2.15e+60:
		tmp = a * 120.0
	elif a <= -1.16e-64:
		tmp = t_1
	elif a <= -1.55e-95:
		tmp = (a * 120.0) + (-60.0 * (y / z))
	elif (a <= 3.9e-92) or (not (a <= 5.8e-78) and (a <= 1.15e-9)):
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))
	tmp = 0.0
	if (a <= -2.15e+60)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.16e-64)
		tmp = t_1;
	elseif (a <= -1.55e-95)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)));
	elseif ((a <= 3.9e-92) || (!(a <= 5.8e-78) && (a <= 1.15e-9)))
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * ((x - y) / (z - t));
	tmp = 0.0;
	if (a <= -2.15e+60)
		tmp = a * 120.0;
	elseif (a <= -1.16e-64)
		tmp = t_1;
	elseif (a <= -1.55e-95)
		tmp = (a * 120.0) + (-60.0 * (y / z));
	elseif ((a <= 3.9e-92) || (~((a <= 5.8e-78)) && (a <= 1.15e-9)))
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.15e+60], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.16e-64], t$95$1, If[LessEqual[a, -1.55e-95], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 3.9e-92], And[N[Not[LessEqual[a, 5.8e-78]], $MachinePrecision], LessEqual[a, 1.15e-9]]], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.16 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-92} \lor \neg \left(a \leq 5.8 \cdot 10^{-78}\right) \land a \leq 1.15 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.14999999999999986e60 or 3.8999999999999997e-92 < a < 5.8000000000000001e-78 or 1.15e-9 < a

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

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

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

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

    if -2.14999999999999986e60 < a < -1.15999999999999992e-64 or -1.54999999999999996e-95 < a < 3.8999999999999997e-92 or 5.8000000000000001e-78 < a < 1.15e-9

    1. Initial program 98.8%

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

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

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

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

    if -1.15999999999999992e-64 < a < -1.54999999999999996e-95

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{+60}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.16 \cdot 10^{-64}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-95}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-92} \lor \neg \left(a \leq 5.8 \cdot 10^{-78}\right) \land a \leq 1.15 \cdot 10^{-9}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 56.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -0.82:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -1.15 \cdot 10^{-237}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-125}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.6999999999999998e60 or -0.819999999999999951 < a < -1.29999999999999996e-112 or 8.0000000000000001e-125 < a

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

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

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

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

    if -4.6999999999999998e60 < a < -0.819999999999999951 or -1.29999999999999996e-112 < a < -1.15000000000000006e-237

    1. Initial program 99.7%

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

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

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

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

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

    if -1.15000000000000006e-237 < a < 2.1000000000000001e-271

    1. Initial program 95.5%

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

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

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

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

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

    if 2.1000000000000001e-271 < a < 8.0000000000000001e-125

    1. Initial program 99.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.7 \cdot 10^{+60}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -0.82:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-112}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-237}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-271}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-125}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 70.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+67}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-93}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.99999999999999976e67

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

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

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

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

    if -4.99999999999999976e67 < (*.f64 a #s(literal 120 binary64)) < -5e7

    1. Initial program 99.9%

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

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

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

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

    if -5e7 < (*.f64 a #s(literal 120 binary64)) < -9.999999999999999e-94

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

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

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

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

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

    if -9.999999999999999e-94 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000027e-129

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} + a \cdot 120 \]
      2. un-div-inv99.6%

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

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

    if 5.00000000000000027e-129 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 70.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -50000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-110}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.99999999999999976e67

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

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

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

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

    if -4.99999999999999976e67 < (*.f64 a #s(literal 120 binary64)) < -5e7 or -2.0000000000000001e-110 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000027e-129

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

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

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

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

    if -5e7 < (*.f64 a #s(literal 120 binary64)) < -2.0000000000000001e-110

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if 5.00000000000000027e-129 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 70.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -50000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-110}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -4.99999999999999976e67

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

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

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

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

    if -4.99999999999999976e67 < (*.f64 a #s(literal 120 binary64)) < -5e7 or -2.0000000000000001e-110 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000027e-129

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

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

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

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

    if -5e7 < (*.f64 a #s(literal 120 binary64)) < -2.0000000000000001e-110

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if 5.00000000000000027e-129 < (*.f64 a #s(literal 120 binary64))

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

Alternative 9: 56.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -40000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -8.5 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.14999999999999986e60 or -4e4 < a < -2.1000000000000001e-112 or 2.5e-133 < a

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

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

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

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

    if -2.14999999999999986e60 < a < -4e4 or -2.1000000000000001e-112 < a < -8.50000000000000022e-245

    1. Initial program 99.7%

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

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

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

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

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

    if -8.50000000000000022e-245 < a < 2.5e-133

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{+60}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -40000:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-112}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-245}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-133}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 54.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{60}{z - t}\\ \mathbf{if}\;x \leq -280000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-200}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-289}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+131}:\\ \;\;\;\;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 -280000000000.0)
     t_1
     (if (<= x -4.9e-200)
       (* a 120.0)
       (if (<= x -3.1e-289)
         (/ (* y -60.0) (- z t))
         (if (<= x 9.2e+131) (* 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 <= -280000000000.0) {
		tmp = t_1;
	} else if (x <= -4.9e-200) {
		tmp = a * 120.0;
	} else if (x <= -3.1e-289) {
		tmp = (y * -60.0) / (z - t);
	} else if (x <= 9.2e+131) {
		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 <= (-280000000000.0d0)) then
        tmp = t_1
    else if (x <= (-4.9d-200)) then
        tmp = a * 120.0d0
    else if (x <= (-3.1d-289)) then
        tmp = (y * (-60.0d0)) / (z - t)
    else if (x <= 9.2d+131) 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 <= -280000000000.0) {
		tmp = t_1;
	} else if (x <= -4.9e-200) {
		tmp = a * 120.0;
	} else if (x <= -3.1e-289) {
		tmp = (y * -60.0) / (z - t);
	} else if (x <= 9.2e+131) {
		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 <= -280000000000.0:
		tmp = t_1
	elif x <= -4.9e-200:
		tmp = a * 120.0
	elif x <= -3.1e-289:
		tmp = (y * -60.0) / (z - t)
	elif x <= 9.2e+131:
		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 <= -280000000000.0)
		tmp = t_1;
	elseif (x <= -4.9e-200)
		tmp = Float64(a * 120.0);
	elseif (x <= -3.1e-289)
		tmp = Float64(Float64(y * -60.0) / Float64(z - t));
	elseif (x <= 9.2e+131)
		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 <= -280000000000.0)
		tmp = t_1;
	elseif (x <= -4.9e-200)
		tmp = a * 120.0;
	elseif (x <= -3.1e-289)
		tmp = (y * -60.0) / (z - t);
	elseif (x <= 9.2e+131)
		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, -280000000000.0], t$95$1, If[LessEqual[x, -4.9e-200], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, -3.1e-289], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e+131], 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 -280000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -4.9 \cdot 10^{-200}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;x \leq 9.2 \cdot 10^{+131}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.8e11 or 9.19999999999999966e131 < x

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

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

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

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

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

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

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

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

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

    if -2.8e11 < x < -4.9e-200 or -3.1e-289 < x < 9.19999999999999966e131

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

    if -4.9e-200 < x < -3.1e-289

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -280000000000:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-200}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-289}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+131}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.8% accurate, 0.5× speedup?

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

\mathbf{elif}\;x \leq -4.5 \cdot 10^{-201}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+130}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.8e11 or 1.3499999999999999e130 < x

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

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

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

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

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

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

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

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

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

    if -2.8e11 < x < -4.5000000000000002e-201 or -1.8000000000000001e-288 < x < 1.3499999999999999e130

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

    if -4.5000000000000002e-201 < x < -1.8000000000000001e-288

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(120 \cdot \frac{a}{y} - 60 \cdot \frac{1}{z - t}\right)} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv94.2%

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

        \[\leadsto y \cdot \left(120 \cdot \frac{a}{y} + \color{blue}{-60} \cdot \frac{1}{z - t}\right) \]
      3. associate-*r/94.3%

        \[\leadsto y \cdot \left(120 \cdot \frac{a}{y} + \color{blue}{\frac{-60 \cdot 1}{z - t}}\right) \]
      4. metadata-eval94.3%

        \[\leadsto y \cdot \left(120 \cdot \frac{a}{y} + \frac{\color{blue}{-60}}{z - t}\right) \]
    10. Simplified94.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -280000000000:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{-201}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-288}:\\ \;\;\;\;y \cdot \frac{-60}{z - t}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+130}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 54.8% accurate, 0.5× speedup?

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

\mathbf{elif}\;x \leq -4.5 \cdot 10^{-201}:\\
\;\;\;\;a \cdot 120\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.8e11 or 1.50000000000000015e129 < x

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

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

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

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

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

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

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

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

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

    if -2.8e11 < x < -4.5000000000000002e-201 or -3.8999999999999998e-289 < x < 1.50000000000000015e129

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.9%

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

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

    if -4.5000000000000002e-201 < x < -3.8999999999999998e-289

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -280000000000:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{-201}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-289}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+129}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 87.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4199999999999999e173 or 2.2e7 < y

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + a \cdot 120} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot -60}{z - t}} + a \cdot 120 \]
      3. associate-*r/92.9%

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

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

    if -1.4199999999999999e173 < y < -3.10000000000000021e74

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

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

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

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

    if -3.10000000000000021e74 < y < 2.2e7

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

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

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

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

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

Alternative 14: 82.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -3.99999999999999991e-120 or 1e-136 < (*.f64 a #s(literal 120 binary64))

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

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

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

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

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

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

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

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

    if -3.99999999999999991e-120 < (*.f64 a #s(literal 120 binary64)) < 1e-136

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} + a \cdot 120 \]
      2. un-div-inv99.6%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} + a \cdot 120 \]
    7. Applied egg-rr91.1%

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

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

Alternative 15: 52.0% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-133}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.25e-136 or 3.8000000000000003e-133 < a

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

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

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

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

    if -1.25e-136 < a < -5.8000000000000001e-215

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

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

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

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

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

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

    if -5.8000000000000001e-215 < a < 3.8000000000000003e-133

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{-136}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-215}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-133}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 57.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{-123} \lor \neg \left(a \leq 1.4 \cdot 10^{-131}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.99999999999999986e-123 or 1.4e-131 < a

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

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

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

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

    if -8.99999999999999986e-123 < a < 1.4e-131

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-123} \lor \neg \left(a \leq 1.4 \cdot 10^{-131}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 51.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{-212} \lor \neg \left(a \leq 6.5 \cdot 10^{-139}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.69999999999999998e-212 or 6.5e-139 < a

    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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
    3. Simplified99.8%

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

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

    if -4.69999999999999998e-212 < a < 6.5e-139

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

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

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

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

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

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

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

Alternative 18: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 60 \cdot \frac{x - y}{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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
60 \cdot \frac{x - y}{z - t} + 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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
  3. Simplified99.8%

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

Alternative 19: 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.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}{60 \cdot \frac{x - y}{z - t}} + a \cdot 120 \]
  3. Simplified99.8%

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

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

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

Developer target: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024087 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

  :alt
  (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))

  (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))