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

Percentage Accurate: 99.2% → 99.7%
Time: 14.0s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 99.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 71.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + -60 \cdot \frac{x}{t}\\ t_2 := -60 \cdot \frac{x - y}{t - z}\\ \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-22}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \cdot 120 \leq 10000000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+164}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (* a 120.0) (* -60.0 (/ x t))))
        (t_2 (* -60.0 (/ (- x y) (- t z)))))
   (if (<= (* a 120.0) -1e+44)
     (* a 120.0)
     (if (<= (* a 120.0) -1e-17)
       t_2
       (if (<= (* a 120.0) -5e-22)
         (* a 120.0)
         (if (<= (* a 120.0) -2e-176)
           t_1
           (if (<= (* a 120.0) 1e-37)
             t_2
             (if (or (<= (* a 120.0) 10000000000000.0)
                     (not (<= (* a 120.0) 5e+164)))
               (* a 120.0)
               t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a * 120.0) + (-60.0 * (x / t));
	double t_2 = -60.0 * ((x - y) / (t - z));
	double tmp;
	if ((a * 120.0) <= -1e+44) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-17) {
		tmp = t_2;
	} else if ((a * 120.0) <= -5e-22) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -2e-176) {
		tmp = t_1;
	} else if ((a * 120.0) <= 1e-37) {
		tmp = t_2;
	} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
		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 = (a * 120.0d0) + ((-60.0d0) * (x / t))
    t_2 = (-60.0d0) * ((x - y) / (t - z))
    if ((a * 120.0d0) <= (-1d+44)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-1d-17)) then
        tmp = t_2
    else if ((a * 120.0d0) <= (-5d-22)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-2d-176)) then
        tmp = t_1
    else if ((a * 120.0d0) <= 1d-37) then
        tmp = t_2
    else if (((a * 120.0d0) <= 10000000000000.0d0) .or. (.not. ((a * 120.0d0) <= 5d+164))) 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 = (a * 120.0) + (-60.0 * (x / t));
	double t_2 = -60.0 * ((x - y) / (t - z));
	double tmp;
	if ((a * 120.0) <= -1e+44) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-17) {
		tmp = t_2;
	} else if ((a * 120.0) <= -5e-22) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -2e-176) {
		tmp = t_1;
	} else if ((a * 120.0) <= 1e-37) {
		tmp = t_2;
	} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a * 120.0) + (-60.0 * (x / t))
	t_2 = -60.0 * ((x - y) / (t - z))
	tmp = 0
	if (a * 120.0) <= -1e+44:
		tmp = a * 120.0
	elif (a * 120.0) <= -1e-17:
		tmp = t_2
	elif (a * 120.0) <= -5e-22:
		tmp = a * 120.0
	elif (a * 120.0) <= -2e-176:
		tmp = t_1
	elif (a * 120.0) <= 1e-37:
		tmp = t_2
	elif ((a * 120.0) <= 10000000000000.0) or not ((a * 120.0) <= 5e+164):
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)))
	t_2 = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -1e+44)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -1e-17)
		tmp = t_2;
	elseif (Float64(a * 120.0) <= -5e-22)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -2e-176)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 1e-37)
		tmp = t_2;
	elseif ((Float64(a * 120.0) <= 10000000000000.0) || !(Float64(a * 120.0) <= 5e+164))
		tmp = Float64(a * 120.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (a * 120.0) + (-60.0 * (x / t));
	t_2 = -60.0 * ((x - y) / (t - z));
	tmp = 0.0;
	if ((a * 120.0) <= -1e+44)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -1e-17)
		tmp = t_2;
	elseif ((a * 120.0) <= -5e-22)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -2e-176)
		tmp = t_1;
	elseif ((a * 120.0) <= 1e-37)
		tmp = t_2;
	elseif (((a * 120.0) <= 10000000000000.0) || ~(((a * 120.0) <= 5e+164)))
		tmp = a * 120.0;
	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[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-17], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-22], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+164]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44 or -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999954e-22 or 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) < 1e13 or 4.9999999999999995e164 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 98.8%

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

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

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

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

    if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999954e-22 < (*.f64 a #s(literal 120 binary64)) < -2e-176 or 1e13 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999995e164

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t - z}\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-22}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t - z}\\ \mathbf{elif}\;a \cdot 120 \leq 10000000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+164}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 71.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot 120 + -60 \cdot \frac{x}{t}\\ t_2 := -60 \cdot \frac{x - y}{t - z}\\ \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-73}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \cdot 120 \leq 10000000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+164}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (* a 120.0) (* -60.0 (/ x t))))
        (t_2 (* -60.0 (/ (- x y) (- t z)))))
   (if (<= (* a 120.0) -1e+44)
     (* a 120.0)
     (if (<= (* a 120.0) -1e-17)
       t_2
       (if (<= (* a 120.0) -2e-73)
         (+ (* a 120.0) (* 60.0 (/ x z)))
         (if (<= (* a 120.0) -2e-176)
           t_1
           (if (<= (* a 120.0) 1e-37)
             t_2
             (if (or (<= (* a 120.0) 10000000000000.0)
                     (not (<= (* a 120.0) 5e+164)))
               (* a 120.0)
               t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a * 120.0) + (-60.0 * (x / t));
	double t_2 = -60.0 * ((x - y) / (t - z));
	double tmp;
	if ((a * 120.0) <= -1e+44) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-17) {
		tmp = t_2;
	} else if ((a * 120.0) <= -2e-73) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= -2e-176) {
		tmp = t_1;
	} else if ((a * 120.0) <= 1e-37) {
		tmp = t_2;
	} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
		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 = (a * 120.0d0) + ((-60.0d0) * (x / t))
    t_2 = (-60.0d0) * ((x - y) / (t - z))
    if ((a * 120.0d0) <= (-1d+44)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-1d-17)) then
        tmp = t_2
    else if ((a * 120.0d0) <= (-2d-73)) then
        tmp = (a * 120.0d0) + (60.0d0 * (x / z))
    else if ((a * 120.0d0) <= (-2d-176)) then
        tmp = t_1
    else if ((a * 120.0d0) <= 1d-37) then
        tmp = t_2
    else if (((a * 120.0d0) <= 10000000000000.0d0) .or. (.not. ((a * 120.0d0) <= 5d+164))) 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 = (a * 120.0) + (-60.0 * (x / t));
	double t_2 = -60.0 * ((x - y) / (t - z));
	double tmp;
	if ((a * 120.0) <= -1e+44) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -1e-17) {
		tmp = t_2;
	} else if ((a * 120.0) <= -2e-73) {
		tmp = (a * 120.0) + (60.0 * (x / z));
	} else if ((a * 120.0) <= -2e-176) {
		tmp = t_1;
	} else if ((a * 120.0) <= 1e-37) {
		tmp = t_2;
	} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
		tmp = a * 120.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a * 120.0) + (-60.0 * (x / t))
	t_2 = -60.0 * ((x - y) / (t - z))
	tmp = 0
	if (a * 120.0) <= -1e+44:
		tmp = a * 120.0
	elif (a * 120.0) <= -1e-17:
		tmp = t_2
	elif (a * 120.0) <= -2e-73:
		tmp = (a * 120.0) + (60.0 * (x / z))
	elif (a * 120.0) <= -2e-176:
		tmp = t_1
	elif (a * 120.0) <= 1e-37:
		tmp = t_2
	elif ((a * 120.0) <= 10000000000000.0) or not ((a * 120.0) <= 5e+164):
		tmp = a * 120.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)))
	t_2 = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -1e+44)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -1e-17)
		tmp = t_2;
	elseif (Float64(a * 120.0) <= -2e-73)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z)));
	elseif (Float64(a * 120.0) <= -2e-176)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= 1e-37)
		tmp = t_2;
	elseif ((Float64(a * 120.0) <= 10000000000000.0) || !(Float64(a * 120.0) <= 5e+164))
		tmp = Float64(a * 120.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (a * 120.0) + (-60.0 * (x / t));
	t_2 = -60.0 * ((x - y) / (t - z));
	tmp = 0.0;
	if ((a * 120.0) <= -1e+44)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -1e-17)
		tmp = t_2;
	elseif ((a * 120.0) <= -2e-73)
		tmp = (a * 120.0) + (60.0 * (x / z));
	elseif ((a * 120.0) <= -2e-176)
		tmp = t_1;
	elseif ((a * 120.0) <= 1e-37)
		tmp = t_2;
	elseif (((a * 120.0) <= 10000000000000.0) || ~(((a * 120.0) <= 5e+164)))
		tmp = a * 120.0;
	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[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-17], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-73], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+164]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44 or 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) < 1e13 or 4.9999999999999995e164 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 98.8%

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

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

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

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

    if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999999e-73

    1. Initial program 99.5%

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

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

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

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

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

    if -1.99999999999999999e-73 < (*.f64 a #s(literal 120 binary64)) < -2e-176 or 1e13 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999995e164

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t - z}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-73}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t - z}\\ \mathbf{elif}\;a \cdot 120 \leq 10000000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+164}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 71.0% accurate, 0.2× speedup?

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

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

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

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+95}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44 or 8.0000000000000004e238 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 98.2%

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

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

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

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

    if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999999e-73

    1. Initial program 99.5%

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

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

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

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

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

    if -1.99999999999999999e-73 < (*.f64 a #s(literal 120 binary64)) < -2e-176

    1. Initial program 99.9%

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

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

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

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

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

    if 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000004e95

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{60}{t}} + a \cdot 120 \]
    10. Simplified75.2%

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

    if 2.00000000000000004e95 < (*.f64 a #s(literal 120 binary64)) < 8.0000000000000004e238

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t - z}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-73}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t - z}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+95}:\\ \;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 8 \cdot 10^{+238}:\\ \;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.7% accurate, 0.3× speedup?

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

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

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

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

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

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

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


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

    1. Initial program 97.5%

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

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

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

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

    if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999999e-73

    1. Initial program 99.5%

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

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

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

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

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

    if -1.99999999999999999e-73 < (*.f64 a #s(literal 120 binary64)) < -2e-176

    1. Initial program 99.9%

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

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

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

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

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

    if 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{60}{t}} + a \cdot 120 \]
    10. Simplified80.5%

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

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

Alternative 6: 57.9% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;a \leq 9 \cdot 10^{-169} \lor \neg \left(a \leq 1.2 \cdot 10^{-40}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.49999999999999976e-51 or -9.7999999999999993e-164 < a < -1.7000000000000001e-193 or 3.9000000000000001e-199 < a < 8.9999999999999997e-169 or 1.19999999999999996e-40 < a

    1. Initial program 99.2%

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

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

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

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

    if -7.49999999999999976e-51 < a < -9.7999999999999993e-164

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-193 < a < 3.9000000000000001e-199

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z}} \]
      4. metadata-eval58.4%

        \[\leadsto \left(x - y\right) \cdot \frac{\color{blue}{60 \cdot 1}}{z} \]
      5. associate-*r/58.3%

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

        \[\leadsto \color{blue}{\left(60 \cdot \frac{1}{z}\right) \cdot \left(x - y\right)} \]
      7. associate-*r/58.4%

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

        \[\leadsto \frac{\color{blue}{60}}{z} \cdot \left(x - y\right) \]
    10. Simplified58.4%

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

    if 8.9999999999999997e-169 < a < 1.19999999999999996e-40

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-51}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -9.8 \cdot 10^{-164}:\\ \;\;\;\;-60 \cdot \frac{x}{t - z}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-193}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-199}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-169} \lor \neg \left(a \leq 1.2 \cdot 10^{-40}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 58.0% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-170} \lor \neg \left(a \leq 1.15 \cdot 10^{-40}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.4e-51 or -1.04999999999999997e-165 < a < -4.00000000000000007e-194 or 3.9000000000000001e-199 < a < 3.6000000000000003e-170 or 1.15e-40 < a

    1. Initial program 99.2%

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

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

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

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

    if -4.4e-51 < a < -1.04999999999999997e-165

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000007e-194 < a < 3.9000000000000001e-199

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z}} \]
      4. metadata-eval58.4%

        \[\leadsto \left(x - y\right) \cdot \frac{\color{blue}{60 \cdot 1}}{z} \]
      5. associate-*r/58.3%

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

        \[\leadsto \color{blue}{\left(60 \cdot \frac{1}{z}\right) \cdot \left(x - y\right)} \]
      7. associate-*r/58.4%

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

        \[\leadsto \frac{\color{blue}{60}}{z} \cdot \left(x - y\right) \]
    10. Simplified58.4%

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

    if 3.6000000000000003e-170 < a < 1.15e-40

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{-51}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-165}:\\ \;\;\;\;\frac{x \cdot -60}{t - z}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-194}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-199}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-170} \lor \neg \left(a \leq 1.15 \cdot 10^{-40}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 58.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{y}{t - z}\\ t_2 := -60 \cdot \frac{x}{t - z}\\ \mathbf{if}\;a \leq -6.7 \cdot 10^{-49}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.04 \cdot 10^{-165}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-178}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-160}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* 60.0 (/ y (- t z)))) (t_2 (* -60.0 (/ x (- t z)))))
   (if (<= a -6.7e-49)
     (* a 120.0)
     (if (<= a -1.04e-165)
       t_2
       (if (<= a -2.3e-178)
         (* a 120.0)
         (if (<= a -6e-306)
           t_1
           (if (<= a 2.7e-160) t_2 (if (<= a 1.36e-40) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (y / (t - z));
	double t_2 = -60.0 * (x / (t - z));
	double tmp;
	if (a <= -6.7e-49) {
		tmp = a * 120.0;
	} else if (a <= -1.04e-165) {
		tmp = t_2;
	} else if (a <= -2.3e-178) {
		tmp = a * 120.0;
	} else if (a <= -6e-306) {
		tmp = t_1;
	} else if (a <= 2.7e-160) {
		tmp = t_2;
	} else if (a <= 1.36e-40) {
		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 * (y / (t - z))
    t_2 = (-60.0d0) * (x / (t - z))
    if (a <= (-6.7d-49)) then
        tmp = a * 120.0d0
    else if (a <= (-1.04d-165)) then
        tmp = t_2
    else if (a <= (-2.3d-178)) then
        tmp = a * 120.0d0
    else if (a <= (-6d-306)) then
        tmp = t_1
    else if (a <= 2.7d-160) then
        tmp = t_2
    else if (a <= 1.36d-40) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 * (y / (t - z));
	double t_2 = -60.0 * (x / (t - z));
	double tmp;
	if (a <= -6.7e-49) {
		tmp = a * 120.0;
	} else if (a <= -1.04e-165) {
		tmp = t_2;
	} else if (a <= -2.3e-178) {
		tmp = a * 120.0;
	} else if (a <= -6e-306) {
		tmp = t_1;
	} else if (a <= 2.7e-160) {
		tmp = t_2;
	} else if (a <= 1.36e-40) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * (y / (t - z))
	t_2 = -60.0 * (x / (t - z))
	tmp = 0
	if a <= -6.7e-49:
		tmp = a * 120.0
	elif a <= -1.04e-165:
		tmp = t_2
	elif a <= -2.3e-178:
		tmp = a * 120.0
	elif a <= -6e-306:
		tmp = t_1
	elif a <= 2.7e-160:
		tmp = t_2
	elif a <= 1.36e-40:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 * Float64(y / Float64(t - z)))
	t_2 = Float64(-60.0 * Float64(x / Float64(t - z)))
	tmp = 0.0
	if (a <= -6.7e-49)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.04e-165)
		tmp = t_2;
	elseif (a <= -2.3e-178)
		tmp = Float64(a * 120.0);
	elseif (a <= -6e-306)
		tmp = t_1;
	elseif (a <= 2.7e-160)
		tmp = t_2;
	elseif (a <= 1.36e-40)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 * (y / (t - z));
	t_2 = -60.0 * (x / (t - z));
	tmp = 0.0;
	if (a <= -6.7e-49)
		tmp = a * 120.0;
	elseif (a <= -1.04e-165)
		tmp = t_2;
	elseif (a <= -2.3e-178)
		tmp = a * 120.0;
	elseif (a <= -6e-306)
		tmp = t_1;
	elseif (a <= 2.7e-160)
		tmp = t_2;
	elseif (a <= 1.36e-40)
		tmp = t_1;
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.7e-49], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.04e-165], t$95$2, If[LessEqual[a, -2.3e-178], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6e-306], t$95$1, If[LessEqual[a, 2.7e-160], t$95$2, If[LessEqual[a, 1.36e-40], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.04 \cdot 10^{-165}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.7 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.36 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.7e-49 or -1.03999999999999996e-165 < a < -2.29999999999999994e-178 or 1.3599999999999999e-40 < a

    1. Initial program 99.2%

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

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

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

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

    if -6.7e-49 < a < -1.03999999999999996e-165 or -6.00000000000000048e-306 < a < 2.7000000000000001e-160

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999994e-178 < a < -6.00000000000000048e-306 or 2.7000000000000001e-160 < a < 1.3599999999999999e-40

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.7 \cdot 10^{-49}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.04 \cdot 10^{-165}:\\ \;\;\;\;-60 \cdot \frac{x}{t - z}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-178}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-306}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-160}:\\ \;\;\;\;-60 \cdot \frac{x}{t - z}\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{-40}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 83.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.3%

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

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

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

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

    if -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.9999999999999999e-38

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 89.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.50000000000000003e91 or 2.0999999999999998e93 < x

    1. Initial program 98.4%

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

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

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

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

    if -1.50000000000000003e91 < x < 2.0999999999999998e93

    1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 11: 74.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{+35} \lor \neg \left(a \leq 3.35 \cdot 10^{-37}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.5999999999999999e35 or 3.35e-37 < a

    1. Initial program 99.1%

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

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

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

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

    if -7.5999999999999999e35 < a < 3.35e-37

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 58.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+132} \lor \neg \left(x \leq 2.4 \cdot 10^{+193}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.2000000000000006e132 or 2.4e193 < x

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.2000000000000006e132 < x < 2.4e193

    1. Initial program 99.8%

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

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

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

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

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

Alternative 13: 52.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+215} \lor \neg \left(y \leq 4.5 \cdot 10^{+166}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.1999999999999998e215 or 4.5000000000000003e166 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t - z}} \]
    7. Simplified66.1%

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

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

    if -6.1999999999999998e215 < y < 4.5000000000000003e166

    1. Initial program 99.3%

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

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

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

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

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

Alternative 14: 52.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+154}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+193}:\\ \;\;\;\;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.7e+154)
   (* 60.0 (/ x z))
   (if (<= x 2.6e+193) (* a 120.0) (* -60.0 (/ x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.7e+154) {
		tmp = 60.0 * (x / z);
	} else if (x <= 2.6e+193) {
		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.7d+154)) then
        tmp = 60.0d0 * (x / z)
    else if (x <= 2.6d+193) 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.7e+154) {
		tmp = 60.0 * (x / z);
	} else if (x <= 2.6e+193) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (x / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -1.7e+154:
		tmp = 60.0 * (x / z)
	elif x <= 2.6e+193:
		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.7e+154)
		tmp = Float64(60.0 * Float64(x / z));
	elseif (x <= 2.6e+193)
		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.7e+154)
		tmp = 60.0 * (x / z);
	elseif (x <= 2.6e+193)
		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.7e+154], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+193], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 2.6 \cdot 10^{+193}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999987e154 < x < 2.60000000000000013e193

    1. Initial program 99.8%

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

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

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

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

    if 2.60000000000000013e193 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 51.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.06 \cdot 10^{+194}:\\ \;\;\;\;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.06e+194) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= 1.06e+194) {
		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.06d+194) 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.06e+194) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (x / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= 1.06e+194:
		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.06e+194)
		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.06e+194)
		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.06e+194], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.06 \cdot 10^{+194}:\\
\;\;\;\;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.0599999999999999e194

    1. Initial program 99.4%

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

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

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

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

    if 1.0599999999999999e194 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 50.8% 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.4%

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification51.1%

    \[\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 2024115 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

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

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