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

Percentage Accurate: 99.3% → 99.8%
Time: 30.5s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Derivation
  1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

Alternative 2: 73.6% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 97.6%

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

        \[\leadsto \color{blue}{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 94.9%

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

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

    if -5.0000000000000001e142 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28

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

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

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

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

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

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

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

    if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 0.0050000000000000001

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 0.0050000000000000001 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot 60}}{t} + a \cdot 120 \]
    6. Simplified78.9%

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

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

Alternative 3: 73.9% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 97.6%

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

        \[\leadsto \color{blue}{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 94.9%

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

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

    if -5.0000000000000001e142 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28

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

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

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

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

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

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

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

    if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000011e63

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 5.00000000000000011e63 < (*.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 z around inf 84.4%

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

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

Alternative 4: 74.0% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 97.6%

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

        \[\leadsto \color{blue}{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 94.9%

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

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

    if -5.0000000000000001e142 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28

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

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

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

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

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

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

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

    if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000011e63

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 5.00000000000000011e63 < (*.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 z around inf 84.4%

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

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

Alternative 5: 51.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{x}{t}\\ \mathbf{if}\;a \leq -6 \cdot 10^{-97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ x t))))
   (if (<= a -6e-97)
     (* a 120.0)
     (if (<= a -1.8e-144)
       t_1
       (if (<= a 4.3e-271)
         (* x (/ 60.0 z))
         (if (<= a 9.5e-30) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (x / t);
	double tmp;
	if (a <= -6e-97) {
		tmp = a * 120.0;
	} else if (a <= -1.8e-144) {
		tmp = t_1;
	} else if (a <= 4.3e-271) {
		tmp = x * (60.0 / z);
	} else if (a <= 9.5e-30) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-60.0d0) * (x / t)
    if (a <= (-6d-97)) then
        tmp = a * 120.0d0
    else if (a <= (-1.8d-144)) then
        tmp = t_1
    else if (a <= 4.3d-271) then
        tmp = x * (60.0d0 / z)
    else if (a <= 9.5d-30) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (x / t);
	double tmp;
	if (a <= -6e-97) {
		tmp = a * 120.0;
	} else if (a <= -1.8e-144) {
		tmp = t_1;
	} else if (a <= 4.3e-271) {
		tmp = x * (60.0 / z);
	} else if (a <= 9.5e-30) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (x / t)
	tmp = 0
	if a <= -6e-97:
		tmp = a * 120.0
	elif a <= -1.8e-144:
		tmp = t_1
	elif a <= 4.3e-271:
		tmp = x * (60.0 / z)
	elif a <= 9.5e-30:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(x / t))
	tmp = 0.0
	if (a <= -6e-97)
		tmp = Float64(a * 120.0);
	elseif (a <= -1.8e-144)
		tmp = t_1;
	elseif (a <= 4.3e-271)
		tmp = Float64(x * Float64(60.0 / z));
	elseif (a <= 9.5e-30)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (x / t);
	tmp = 0.0;
	if (a <= -6e-97)
		tmp = a * 120.0;
	elseif (a <= -1.8e-144)
		tmp = t_1;
	elseif (a <= 4.3e-271)
		tmp = x * (60.0 / z);
	elseif (a <= 9.5e-30)
		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[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e-97], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-144], t$95$1, If[LessEqual[a, 4.3e-271], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e-30], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.00000000000000048e-97 or 9.49999999999999939e-30 < a

    1. Initial program 99.3%

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

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

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

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

    if -6.00000000000000048e-97 < a < -1.8e-144 or 4.3e-271 < a < 9.49999999999999939e-30

    1. Initial program 97.8%

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

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

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

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

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

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

    if -1.8e-144 < a < 4.3e-271

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z}} + a \cdot 120 \]
    7. Taylor expanded in x around inf 36.0%

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      2. *-commutative36.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{-97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-144}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-30}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{x}{t}\\ \mathbf{if}\;a \leq -7 \cdot 10^{-97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-272}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ x t))))
   (if (<= a -7e-97)
     (* a 120.0)
     (if (<= a -7.5e-144)
       t_1
       (if (<= a 2.7e-272)
         (* 60.0 (/ x z))
         (if (<= a 9.2e-30) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (x / t);
	double tmp;
	if (a <= -7e-97) {
		tmp = a * 120.0;
	} else if (a <= -7.5e-144) {
		tmp = t_1;
	} else if (a <= 2.7e-272) {
		tmp = 60.0 * (x / z);
	} else if (a <= 9.2e-30) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-60.0d0) * (x / t)
    if (a <= (-7d-97)) then
        tmp = a * 120.0d0
    else if (a <= (-7.5d-144)) then
        tmp = t_1
    else if (a <= 2.7d-272) then
        tmp = 60.0d0 * (x / z)
    else if (a <= 9.2d-30) then
        tmp = t_1
    else
        tmp = a * 120.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (x / t);
	double tmp;
	if (a <= -7e-97) {
		tmp = a * 120.0;
	} else if (a <= -7.5e-144) {
		tmp = t_1;
	} else if (a <= 2.7e-272) {
		tmp = 60.0 * (x / z);
	} else if (a <= 9.2e-30) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (x / t)
	tmp = 0
	if a <= -7e-97:
		tmp = a * 120.0
	elif a <= -7.5e-144:
		tmp = t_1
	elif a <= 2.7e-272:
		tmp = 60.0 * (x / z)
	elif a <= 9.2e-30:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(x / t))
	tmp = 0.0
	if (a <= -7e-97)
		tmp = Float64(a * 120.0);
	elseif (a <= -7.5e-144)
		tmp = t_1;
	elseif (a <= 2.7e-272)
		tmp = Float64(60.0 * Float64(x / z));
	elseif (a <= 9.2e-30)
		tmp = t_1;
	else
		tmp = Float64(a * 120.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -60.0 * (x / t);
	tmp = 0.0;
	if (a <= -7e-97)
		tmp = a * 120.0;
	elseif (a <= -7.5e-144)
		tmp = t_1;
	elseif (a <= 2.7e-272)
		tmp = 60.0 * (x / z);
	elseif (a <= 9.2e-30)
		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[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7e-97], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -7.5e-144], t$95$1, If[LessEqual[a, 2.7e-272], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e-30], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.00000000000000038e-97 or 9.19999999999999937e-30 < a

    1. Initial program 99.3%

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

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

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

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

    if -7.00000000000000038e-97 < a < -7.49999999999999963e-144 or 2.69999999999999993e-272 < a < 9.19999999999999937e-30

    1. Initial program 97.8%

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

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

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

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

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

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

    if -7.49999999999999963e-144 < a < 2.69999999999999993e-272

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z}} + a \cdot 120 \]
    7. Taylor expanded in x around inf 36.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-97}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-272}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-30}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\

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

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


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

    1. Initial program 98.3%

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

        \[\leadsto \color{blue}{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.8%

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

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

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

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

    if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000011e63

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

    if 5.00000000000000011e63 < (*.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 z around inf 84.4%

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

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

Alternative 8: 88.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+170} \lor \neg \left(y \leq 6 \cdot 10^{+98}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999979e170 or 6.0000000000000003e98 < y

    1. Initial program 98.7%

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

        \[\leadsto \color{blue}{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 94.0%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg93.5%

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

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

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

        \[\leadsto \color{blue}{60} \cdot \frac{y}{-\left(z - t\right)} + a \cdot 120 \]
      6. neg-sub094.0%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{0 - \left(z - t\right)}} + a \cdot 120 \]
      7. sub-neg94.0%

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

        \[\leadsto 60 \cdot \frac{y}{0 - \color{blue}{\left(\left(-t\right) + z\right)}} + a \cdot 120 \]
      9. associate--r+94.0%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z} + a \cdot 120 \]
      11. remove-double-neg94.0%

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

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

    if -3.19999999999999979e170 < y < 6.0000000000000003e98

    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 x around inf 92.6%

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

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

Alternative 9: 82.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000007e170 or 9.8000000000000003e157 < y

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

    if -2.00000000000000007e170 < y < 9.8000000000000003e157

    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 x around inf 91.2%

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

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

Alternative 10: 88.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+169}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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

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


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

    1. Initial program 100.0%

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

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

    if -9.4999999999999995e169 < y < 3.04999999999999992e96

    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 x around inf 92.6%

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

    if 3.04999999999999992e96 < y

    1. Initial program 98.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} + a \cdot 120 \]
      2. remove-double-neg94.0%

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

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

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

        \[\leadsto \color{blue}{60} \cdot \frac{y}{-\left(z - t\right)} + a \cdot 120 \]
      6. neg-sub094.8%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{0 - \left(z - t\right)}} + a \cdot 120 \]
      7. sub-neg94.8%

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

        \[\leadsto 60 \cdot \frac{y}{0 - \color{blue}{\left(\left(-t\right) + z\right)}} + a \cdot 120 \]
      9. associate--r+94.8%

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z} + a \cdot 120 \]
      11. remove-double-neg94.8%

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

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

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

Alternative 11: 75.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+26} \lor \neg \left(a \leq 2.05 \cdot 10^{+62}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.2000000000000002e26 or 2.04999999999999992e62 < 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 80.5%

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

    if -4.2000000000000002e26 < a < 2.04999999999999992e62

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

Alternative 12: 58.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-85} \lor \neg \left(a \leq 1.02 \cdot 10^{-29}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.9999999999999998e-86 or 1.01999999999999994e-29 < a

    1. Initial program 99.3%

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

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

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

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

    if -9.9999999999999998e-86 < a < 1.01999999999999994e-29

    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.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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

Alternative 13: 58.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+170} \lor \neg \left(y \leq 2.2 \cdot 10^{+158}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.49999999999999998e170 or 2.2000000000000001e158 < y

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

    if -1.49999999999999998e170 < y < 2.2000000000000001e158

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

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

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

Alternative 14: 52.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+189} \lor \neg \left(y \leq 4.6 \cdot 10^{+158}\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 -1.95e+189) (not (<= y 4.6e+158)))
   (* -60.0 (/ y z))
   (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -1.95e+189) || !(y <= 4.6e+158)) {
		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 <= (-1.95d+189)) .or. (.not. (y <= 4.6d+158))) 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 <= -1.95e+189) || !(y <= 4.6e+158)) {
		tmp = -60.0 * (y / z);
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -1.95e+189) or not (y <= 4.6e+158):
		tmp = -60.0 * (y / z)
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -1.95e+189) || !(y <= 4.6e+158))
		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 <= -1.95e+189) || ~((y <= 4.6e+158)))
		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, -1.95e+189], N[Not[LessEqual[y, 4.6e+158]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+189} \lor \neg \left(y \leq 4.6 \cdot 10^{+158}\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 < -1.95e189 or 4.59999999999999971e158 < y

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

    if -1.95e189 < y < 4.59999999999999971e158

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

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

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

Alternative 15: 52.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+193} \lor \neg \left(x \leq 9.5 \cdot 10^{+161}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.3e193 or 9.50000000000000061e161 < x

    1. Initial program 96.6%

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

        \[\leadsto \color{blue}{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 96.6%

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

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

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

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

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

    if -3.3e193 < x < 9.50000000000000061e161

    1. Initial program 99.9%

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

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

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

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

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

Alternative 16: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (/ (- x y) (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return ((x - y) / ((z - t) * 0.016666666666666666)) + (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 = ((x - y) / ((z - t) * 0.016666666666666666d0)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a):
	return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.1%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}} + a \cdot 120 \]
  7. Add Preprocessing

Alternative 17: 99.8% accurate, 1.0× speedup?

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

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

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

      \[\leadsto \color{blue}{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 a \cdot 120 + 60 \cdot \frac{x - y}{z - t} \]
  6. Add Preprocessing

Alternative 18: 50.5% accurate, 4.3× speedup?

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

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

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

      \[\leadsto \color{blue}{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 1: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))

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