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

Percentage Accurate: 99.3% → 99.8%
Time: 17.6s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\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. +-commutative99.0%

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

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

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

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

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

Alternative 2: 71.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ t_2 := a \cdot 120 + \frac{-60}{\frac{t}{x}}\\ \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60} \lor \neg \left(a \cdot 120 \leq 500000\right) \land a \cdot 120 \leq 10^{+66}:\\ \;\;\;\;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))))
        (t_2 (+ (* a 120.0) (/ -60.0 (/ t x)))))
   (if (<= (* a 120.0) -5e+60)
     t_2
     (if (<= (* a 120.0) -4e-20)
       t_1
       (if (<= (* a 120.0) -5e-97)
         t_2
         (if (or (<= (* a 120.0) 5e-60)
                 (and (not (<= (* a 120.0) 500000.0)) (<= (* a 120.0) 1e+66)))
           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 t_2 = (a * 120.0) + (-60.0 / (t / x));
	double tmp;
	if ((a * 120.0) <= -5e+60) {
		tmp = t_2;
	} else if ((a * 120.0) <= -4e-20) {
		tmp = t_1;
	} else if ((a * 120.0) <= -5e-97) {
		tmp = t_2;
	} else if (((a * 120.0) <= 5e-60) || (!((a * 120.0) <= 500000.0) && ((a * 120.0) <= 1e+66))) {
		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) :: t_2
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / (z - t))
    t_2 = (a * 120.0d0) + ((-60.0d0) / (t / x))
    if ((a * 120.0d0) <= (-5d+60)) then
        tmp = t_2
    else if ((a * 120.0d0) <= (-4d-20)) then
        tmp = t_1
    else if ((a * 120.0d0) <= (-5d-97)) then
        tmp = t_2
    else if (((a * 120.0d0) <= 5d-60) .or. (.not. ((a * 120.0d0) <= 500000.0d0)) .and. ((a * 120.0d0) <= 1d+66)) 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 t_2 = (a * 120.0) + (-60.0 / (t / x));
	double tmp;
	if ((a * 120.0) <= -5e+60) {
		tmp = t_2;
	} else if ((a * 120.0) <= -4e-20) {
		tmp = t_1;
	} else if ((a * 120.0) <= -5e-97) {
		tmp = t_2;
	} else if (((a * 120.0) <= 5e-60) || (!((a * 120.0) <= 500000.0) && ((a * 120.0) <= 1e+66))) {
		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))
	t_2 = (a * 120.0) + (-60.0 / (t / x))
	tmp = 0
	if (a * 120.0) <= -5e+60:
		tmp = t_2
	elif (a * 120.0) <= -4e-20:
		tmp = t_1
	elif (a * 120.0) <= -5e-97:
		tmp = t_2
	elif ((a * 120.0) <= 5e-60) or (not ((a * 120.0) <= 500000.0) and ((a * 120.0) <= 1e+66)):
		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)))
	t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -5e+60)
		tmp = t_2;
	elseif (Float64(a * 120.0) <= -4e-20)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= -5e-97)
		tmp = t_2;
	elseif ((Float64(a * 120.0) <= 5e-60) || (!(Float64(a * 120.0) <= 500000.0) && (Float64(a * 120.0) <= 1e+66)))
		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));
	t_2 = (a * 120.0) + (-60.0 / (t / x));
	tmp = 0.0;
	if ((a * 120.0) <= -5e+60)
		tmp = t_2;
	elseif ((a * 120.0) <= -4e-20)
		tmp = t_1;
	elseif ((a * 120.0) <= -5e-97)
		tmp = t_2;
	elseif (((a * 120.0) <= 5e-60) || (~(((a * 120.0) <= 500000.0)) && ((a * 120.0) <= 1e+66)))
		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]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+60], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 500000.0]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e+66]]], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60} \lor \neg \left(a \cdot 120 \leq 500000\right) \land a \cdot 120 \leq 10^{+66}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999975e60 or -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. associate-/l*80.1%

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

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

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

    if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65

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

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

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

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

    if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120)

    1. Initial program 98.3%

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

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

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

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

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

Alternative 3: 71.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60}{\frac{z - t}{x - y}}\\ t_2 := a \cdot 120 + \frac{-60}{\frac{t}{x}}\\ \mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60} \lor \neg \left(a \cdot 120 \leq 500000\right) \land a \cdot 120 \leq 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ 60.0 (/ (- z t) (- x y))))
        (t_2 (+ (* a 120.0) (/ -60.0 (/ t x)))))
   (if (<= (* a 120.0) -5e+60)
     t_2
     (if (<= (* a 120.0) -4e-20)
       t_1
       (if (<= (* a 120.0) -5e-97)
         t_2
         (if (or (<= (* a 120.0) 5e-60)
                 (and (not (<= (* a 120.0) 500000.0)) (<= (* a 120.0) 1e+66)))
           t_1
           (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 / ((z - t) / (x - y));
	double t_2 = (a * 120.0) + (-60.0 / (t / x));
	double tmp;
	if ((a * 120.0) <= -5e+60) {
		tmp = t_2;
	} else if ((a * 120.0) <= -4e-20) {
		tmp = t_1;
	} else if ((a * 120.0) <= -5e-97) {
		tmp = t_2;
	} else if (((a * 120.0) <= 5e-60) || (!((a * 120.0) <= 500000.0) && ((a * 120.0) <= 1e+66))) {
		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) :: t_2
    real(8) :: tmp
    t_1 = 60.0d0 / ((z - t) / (x - y))
    t_2 = (a * 120.0d0) + ((-60.0d0) / (t / x))
    if ((a * 120.0d0) <= (-5d+60)) then
        tmp = t_2
    else if ((a * 120.0d0) <= (-4d-20)) then
        tmp = t_1
    else if ((a * 120.0d0) <= (-5d-97)) then
        tmp = t_2
    else if (((a * 120.0d0) <= 5d-60) .or. (.not. ((a * 120.0d0) <= 500000.0d0)) .and. ((a * 120.0d0) <= 1d+66)) 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 / ((z - t) / (x - y));
	double t_2 = (a * 120.0) + (-60.0 / (t / x));
	double tmp;
	if ((a * 120.0) <= -5e+60) {
		tmp = t_2;
	} else if ((a * 120.0) <= -4e-20) {
		tmp = t_1;
	} else if ((a * 120.0) <= -5e-97) {
		tmp = t_2;
	} else if (((a * 120.0) <= 5e-60) || (!((a * 120.0) <= 500000.0) && ((a * 120.0) <= 1e+66))) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 / ((z - t) / (x - y))
	t_2 = (a * 120.0) + (-60.0 / (t / x))
	tmp = 0
	if (a * 120.0) <= -5e+60:
		tmp = t_2
	elif (a * 120.0) <= -4e-20:
		tmp = t_1
	elif (a * 120.0) <= -5e-97:
		tmp = t_2
	elif ((a * 120.0) <= 5e-60) or (not ((a * 120.0) <= 500000.0) and ((a * 120.0) <= 1e+66)):
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))
	t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -5e+60)
		tmp = t_2;
	elseif (Float64(a * 120.0) <= -4e-20)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= -5e-97)
		tmp = t_2;
	elseif ((Float64(a * 120.0) <= 5e-60) || (!(Float64(a * 120.0) <= 500000.0) && (Float64(a * 120.0) <= 1e+66)))
		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 / ((z - t) / (x - y));
	t_2 = (a * 120.0) + (-60.0 / (t / x));
	tmp = 0.0;
	if ((a * 120.0) <= -5e+60)
		tmp = t_2;
	elseif ((a * 120.0) <= -4e-20)
		tmp = t_1;
	elseif ((a * 120.0) <= -5e-97)
		tmp = t_2;
	elseif (((a * 120.0) <= 5e-60) || (~(((a * 120.0) <= 500000.0)) && ((a * 120.0) <= 1e+66)))
		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[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+60], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 500000.0]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e+66]]], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60} \lor \neg \left(a \cdot 120 \leq 500000\right) \land a \cdot 120 \leq 10^{+66}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.99999999999999975e60 or -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. associate-/l*80.1%

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

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

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

    if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} \]
      2. un-div-inv79.4%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr79.4%

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

    if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120)

    1. Initial program 98.3%

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

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

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

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

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

Alternative 4: 71.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \cdot 120 \leq 500000 \lor \neg \left(a \cdot 120 \leq 10^{+66}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -4.99999999999999975e60 or -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. associate-/l*80.1%

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

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

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

    if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65

    1. Initial program 96.4%

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} \]
      2. un-div-inv73.3%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr73.3%

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

    if -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60

    1. Initial program 99.7%

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

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

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

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

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

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

    if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120)

    1. Initial program 98.3%

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

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

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

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

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

Alternative 5: 81.5% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-193}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -2e24 or -2e3 < (*.f64 a 120) < -4.9999999999999995e-97 or 2.0000000000000001e-193 < (*.f64 a 120)

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

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

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

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

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

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

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

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

    if -2e24 < (*.f64 a 120) < -2e3

    1. Initial program 86.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr99.6%

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

    if -4.9999999999999995e-97 < (*.f64 a 120) < 2.0000000000000001e-193

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 6: 81.5% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -2e24 or 2.0000000000000001e-193 < (*.f64 a 120)

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

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

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

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

    if -2e24 < (*.f64 a 120) < -2e3

    1. Initial program 86.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr99.6%

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

    if -2e3 < (*.f64 a 120) < -4.9999999999999995e-97

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -4.9999999999999995e-97 < (*.f64 a 120) < 2.0000000000000001e-193

    1. Initial program 99.7%

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

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

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

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

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

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

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

Alternative 7: 74.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+24} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-60}\right) \land \left(a \cdot 120 \leq 500000 \lor \neg \left(a \cdot 120 \leq 10^{+66}\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 (*.f64 a 120) < -2e24 or 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120)

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

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

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

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

    if -2e24 < (*.f64 a 120) < 5.0000000000000001e-60 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65

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

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

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

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

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

Alternative 8: 57.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+20} \lor \neg \left(a \leq -1.5 \cdot 10^{-5} \lor \neg \left(a \leq -1.95 \cdot 10^{-104}\right) \land a \leq 1.1 \cdot 10^{-186}\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 -1.9e+20)
         (not
          (or (<= a -1.5e-5) (and (not (<= a -1.95e-104)) (<= a 1.1e-186)))))
   (* a 120.0)
   (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.9e+20) || !((a <= -1.5e-5) || (!(a <= -1.95e-104) && (a <= 1.1e-186)))) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (y / (z - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-1.9d+20)) .or. (.not. (a <= (-1.5d-5)) .or. (.not. (a <= (-1.95d-104))) .and. (a <= 1.1d-186))) then
        tmp = a * 120.0d0
    else
        tmp = (-60.0d0) * (y / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.9e+20) || !((a <= -1.5e-5) || (!(a <= -1.95e-104) && (a <= 1.1e-186)))) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (y / (z - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -1.9e+20) or not ((a <= -1.5e-5) or (not (a <= -1.95e-104) and (a <= 1.1e-186))):
		tmp = a * 120.0
	else:
		tmp = -60.0 * (y / (z - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.9e+20) || !((a <= -1.5e-5) || (!(a <= -1.95e-104) && (a <= 1.1e-186))))
		tmp = Float64(a * 120.0);
	else
		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -1.9e+20) || ~(((a <= -1.5e-5) || (~((a <= -1.95e-104)) && (a <= 1.1e-186)))))
		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, -1.9e+20], N[Not[Or[LessEqual[a, -1.5e-5], And[N[Not[LessEqual[a, -1.95e-104]], $MachinePrecision], LessEqual[a, 1.1e-186]]]], $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 -1.9 \cdot 10^{+20} \lor \neg \left(a \leq -1.5 \cdot 10^{-5} \lor \neg \left(a \leq -1.95 \cdot 10^{-104}\right) \land a \leq 1.1 \cdot 10^{-186}\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 < -1.9e20 or -1.50000000000000004e-5 < a < -1.9500000000000001e-104 or 1.10000000000000007e-186 < 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.3%

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

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

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

    if -1.9e20 < a < -1.50000000000000004e-5 or -1.9500000000000001e-104 < a < 1.10000000000000007e-186

    1. Initial program 98.5%

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x - y}}} \]
      2. un-div-inv88.0%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr88.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+20} \lor \neg \left(a \leq -1.5 \cdot 10^{-5} \lor \neg \left(a \leq -1.95 \cdot 10^{-104}\right) \land a \leq 1.1 \cdot 10^{-186}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
t_2 := 60 \cdot \frac{x}{z}\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+256}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -3.4 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -7.8 \cdot 10^{+110}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+218}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.95000000000000009e256 or -3.39999999999999995e188 < x < -7.8000000000000007e110

    1. Initial program 95.9%

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

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

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

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

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

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

    if -1.95000000000000009e256 < x < -3.39999999999999995e188 or 1.7500000000000001e218 < x

    1. Initial program 96.8%

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

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

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

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

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

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

    if -7.8000000000000007e110 < x < 1.7500000000000001e218

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+256}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+188}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{+110}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+218}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 51.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
t_2 := x \cdot \frac{60}{z}\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+249}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.06 \cdot 10^{+189}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{+110}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 1.95 \cdot 10^{+218}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.7999999999999997e249 or -1.05999999999999998e189 < x < -7.5e110

    1. Initial program 95.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{z} \cdot x} \]
    9. Simplified59.0%

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

    if -3.7999999999999997e249 < x < -1.05999999999999998e189 or 1.9500000000000001e218 < x

    1. Initial program 96.8%

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

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

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

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

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

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

    if -7.5e110 < x < 1.9500000000000001e218

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{+249}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{+189}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{+110}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+218}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 89.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35e93 or 6.5000000000000001e40 < y

    1. Initial program 98.8%

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

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

    if -1.35e93 < y < 6.5000000000000001e40

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

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

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

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

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

Alternative 12: 57.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+73} \lor \neg \left(x \leq 1.25 \cdot 10^{+95}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.01999999999999995e73 or 1.25000000000000006e95 < x

    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*98.6%

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

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

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

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

    if -1.01999999999999995e73 < x < 1.25000000000000006e95

    1. Initial program 99.8%

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

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

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

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

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

Alternative 13: 57.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+73} \lor \neg \left(x \leq 6.2 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.99999999999999997e73 or 6.20000000000000014e100 < x

    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*98.6%

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x}}} \]
      2. un-div-inv59.7%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x}}} \]
    8. Applied egg-rr59.7%

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

    if -1.99999999999999997e73 < x < 6.20000000000000014e100

    1. Initial program 99.8%

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

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

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

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

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

Alternative 14: 57.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq 1.95 \cdot 10^{+99}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 95.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    8. Applied egg-rr59.4%

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

    if -1.7000000000000001e73 < x < 1.94999999999999997e99

    1. Initial program 99.8%

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

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

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

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

    if 1.94999999999999997e99 < x

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{z - t}{x}}} \]
      2. un-div-inv60.2%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x}}} \]
    8. Applied egg-rr60.2%

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

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

Alternative 15: 99.7% accurate, 1.0× speedup?

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

\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.0%

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

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

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

Alternative 16: 51.5% accurate, 1.3× speedup?

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

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

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


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

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

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

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

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

    if 1.09999999999999995e220 < x

    1. Initial program 99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.1 \cdot 10^{+220}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.7% accurate, 4.3× speedup?

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

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

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

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

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

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

Developer target: 99.7% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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