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

Percentage Accurate: 99.4% → 99.7%
Time: 13.3s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

      \[\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. Final simplification99.8%

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

Alternative 2: 72.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+31} \lor \neg \left(a \cdot 120 \leq -2 \cdot 10^{-85} \lor \neg \left(a \cdot 120 \leq -4 \cdot 10^{-139}\right) \land a \cdot 120 \leq 5 \cdot 10^{-76}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999996e30 or -2e-85 < (*.f64 a #s(literal 120 binary64)) < -4.00000000000000012e-139 or 4.9999999999999998e-76 < (*.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 75.4%

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

    if -9.9999999999999996e30 < (*.f64 a #s(literal 120 binary64)) < -2e-85 or -4.00000000000000012e-139 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999998e-76

    1. Initial program 97.8%

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

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

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

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

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

Alternative 3: 71.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+31}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-85} \lor \neg \left(a \cdot 120 \leq -4 \cdot 10^{-139}\right) \land a \cdot 120 \leq 5 \cdot 10^{-76}:\\ \;\;\;\;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) -1e+31)
   (+ (* a 120.0) (* -60.0 (/ y z)))
   (if (or (<= (* a 120.0) -2e-85)
           (and (not (<= (* a 120.0) -4e-139)) (<= (* a 120.0) 5e-76)))
     (* 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) <= -1e+31) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else if (((a * 120.0) <= -2e-85) || (!((a * 120.0) <= -4e-139) && ((a * 120.0) <= 5e-76))) {
		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) <= (-1d+31)) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
    else if (((a * 120.0d0) <= (-2d-85)) .or. (.not. ((a * 120.0d0) <= (-4d-139))) .and. ((a * 120.0d0) <= 5d-76)) 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) <= -1e+31) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else if (((a * 120.0) <= -2e-85) || (!((a * 120.0) <= -4e-139) && ((a * 120.0) <= 5e-76))) {
		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) <= -1e+31:
		tmp = (a * 120.0) + (-60.0 * (y / z))
	elif ((a * 120.0) <= -2e-85) or (not ((a * 120.0) <= -4e-139) and ((a * 120.0) <= 5e-76)):
		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) <= -1e+31)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)));
	elseif ((Float64(a * 120.0) <= -2e-85) || (!(Float64(a * 120.0) <= -4e-139) && (Float64(a * 120.0) <= 5e-76)))
		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) <= -1e+31)
		tmp = (a * 120.0) + (-60.0 * (y / z));
	elseif (((a * 120.0) <= -2e-85) || (~(((a * 120.0) <= -4e-139)) && ((a * 120.0) <= 5e-76)))
		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], -1e+31], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-85], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-139]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 5e-76]]], 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 -1 \cdot 10^{+31}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-85} \lor \neg \left(a \cdot 120 \leq -4 \cdot 10^{-139}\right) \land a \cdot 120 \leq 5 \cdot 10^{-76}:\\
\;\;\;\;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)) < -9.9999999999999996e30

    1. Initial program 99.8%

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

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot 60}}{z - t} + a \cdot 120 \]
      2. associate-/l*99.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. Taylor expanded in z around inf 75.4%

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

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

    if -9.9999999999999996e30 < (*.f64 a #s(literal 120 binary64)) < -2e-85 or -4.00000000000000012e-139 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999998e-76

    1. Initial program 97.8%

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

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

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

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

    if -2e-85 < (*.f64 a #s(literal 120 binary64)) < -4.00000000000000012e-139 or 4.9999999999999998e-76 < (*.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 74.0%

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

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

Alternative 4: 57.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{+28} \lor \neg \left(a \leq -1.42 \cdot 10^{-37}\right) \land \left(a \leq -1.15 \cdot 10^{-151} \lor \neg \left(a \leq 1.1 \cdot 10^{-74}\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1000000000000001e28 or -1.42e-37 < a < -1.14999999999999998e-151 or 1.10000000000000005e-74 < a

    1. Initial program 99.8%

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

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

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

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

    if -3.1000000000000001e28 < a < -1.42e-37 or -1.14999999999999998e-151 < a < 1.10000000000000005e-74

    1. Initial program 97.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{+28} \lor \neg \left(a \leq -1.42 \cdot 10^{-37}\right) \land \left(a \leq -1.15 \cdot 10^{-151} \lor \neg \left(a \leq 1.1 \cdot 10^{-74}\right)\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

    if -4.00000000000000012e-139 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999989e-138

    1. Initial program 98.2%

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

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

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

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

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

Alternative 6: 51.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.7 \cdot 10^{-240}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-163}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+102}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 7.7e-240 or 5.4999999999999998e-163 < y < 3.29999999999999999e102

    1. Initial program 99.3%

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

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

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

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

    if 7.7e-240 < y < 5.4999999999999998e-163

    1. Initial program 93.6%

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

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

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

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

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

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

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

    if 3.29999999999999999e102 < y

    1. Initial program 99.6%

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

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

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

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

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

Alternative 7: 86.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+218} \lor \neg \left(y \leq 5.5 \cdot 10^{+42}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.25000000000000004e218 or 5.50000000000000001e42 < y

    1. Initial program 98.5%

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

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

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

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

    if -2.25000000000000004e218 < y < 5.50000000000000001e42

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

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

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

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

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

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

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

Alternative 8: 82.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+32}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.15e32

    1. Initial program 97.9%

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

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

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

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

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

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

    if -1.15e32 < t < 1.79999999999999989e-56

    1. Initial program 99.0%

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

        \[\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. Taylor expanded in z around inf 87.9%

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

    if 1.79999999999999989e-56 < t

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

Alternative 9: 52.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-260} \lor \neg \left(a \leq 2.3 \cdot 10^{-133}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.7999999999999998e-260 or 2.3e-133 < a

    1. Initial program 98.9%

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

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

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

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

    if -2.7999999999999998e-260 < a < 2.3e-133

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 99.7% 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.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. Final simplification99.8%

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

Alternative 11: 51.3% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.90000000000000026e197

    1. Initial program 96.2%

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

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

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

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

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

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

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

    if -4.90000000000000026e197 < x

    1. Initial program 99.3%

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

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

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

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

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

Alternative 12: 50.7% accurate, 4.3× speedup?

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

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

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

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

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

Developer target: 99.7% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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