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

Percentage Accurate: 99.3% → 99.3%
Time: 13.1s
Alternatives: 15
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 15 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.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}
Derivation
  1. Initial program 99.8%

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

Alternative 2: 67.1% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 x y) < -4.9999999999999997e111 or 1.99999999999999993e90 < (-.f64 x y)

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
      4. *-commutative99.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 a around 0 72.3%

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

    if -4.9999999999999997e111 < (-.f64 x y) < 1.99999999999999993e90

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

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

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

Alternative 3: 67.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x - y \leq 2 \cdot 10^{+90}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 x y) < -4.9999999999999997e111

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

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

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

        \[\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 71.7%

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

    if -4.9999999999999997e111 < (-.f64 x y) < 1.99999999999999993e90

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

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

    if 1.99999999999999993e90 < (-.f64 x y)

    1. Initial program 99.7%

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

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

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

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

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

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

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

      \[\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 72.8%

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Applied egg-rr72.9%

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

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

Alternative 4: 88.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.19999999999999989e91 or 3.49999999999999976e-60 < x

    1. Initial program 99.7%

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

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

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

    if -3.19999999999999989e91 < x < 3.49999999999999976e-60

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

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

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

Alternative 5: 88.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.4e91 or 7.2999999999999997e-60 < x

    1. Initial program 99.7%

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

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

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

    if -5.4e91 < x < 7.2999999999999997e-60

    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 x around 0 97.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(120, a, 60 \cdot \frac{y}{\color{blue}{\left(0 - \left(-t\right)\right) - z}}\right) \]
      12. neg-sub097.0%

        \[\leadsto \mathsf{fma}\left(120, a, 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z}\right) \]
      13. remove-double-neg97.0%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(120, a, 60 \cdot \frac{y}{t - z}\right)} \]
    8. Step-by-step derivation
      1. fma-undefine97.0%

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

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

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{t - z}{y}}} + a \cdot 120 \]
      5. un-div-inv97.0%

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

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

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

Alternative 6: 82.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1999999999999999e-68 or 62000 < t

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto 60 \cdot \frac{\color{blue}{0 - \left(x - y\right)}}{t} + a \cdot 120 \]
      4. sub-neg87.9%

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

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

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

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

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

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

    if -3.1999999999999999e-68 < t < 62000

    1. Initial program 99.8%

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

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

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

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

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

Alternative 7: 80.4% accurate, 0.6× speedup?

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

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

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

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


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

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

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

        \[\leadsto \mathsf{fma}\left(a, 120, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
      4. *-commutative99.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 a around 0 69.7%

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Applied egg-rr69.8%

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

    if -4.2999999999999998e92 < y < 3.14999999999999989e243

    1. Initial program 99.8%

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

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

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

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

    if 3.14999999999999989e243 < y

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

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

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

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

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

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

        \[\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. Step-by-step derivation
      1. clear-num99.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. *-commutative85.8%

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

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

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

Alternative 8: 57.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.08 \cdot 10^{+141} \lor \neg \left(x \leq 4.05 \cdot 10^{+158}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.08000000000000007e141 or 4.0499999999999999e158 < x

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\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 73.9%

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

    if -1.08000000000000007e141 < x < 4.0499999999999999e158

    1. Initial program 99.8%

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

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

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

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

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

Alternative 9: 57.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq 7.4 \cdot 10^{+158}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\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 75.1%

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

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

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} \]
      3. *-commutative75.3%

        \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} \]
    9. Simplified75.3%

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

    if -1.4499999999999999e139 < x < 7.40000000000000021e158

    1. Initial program 99.8%

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

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

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

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

    if 7.40000000000000021e158 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\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 72.7%

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

        \[\leadsto \color{blue}{\frac{1}{0.016666666666666666}} \cdot \frac{x}{z - t} \]
      2. times-frac72.7%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{0.016666666666666666 \cdot \left(z - t\right)}} \]
      3. *-un-lft-identity72.7%

        \[\leadsto \frac{\color{blue}{x}}{0.016666666666666666 \cdot \left(z - t\right)} \]
      4. *-commutative72.7%

        \[\leadsto \frac{x}{\color{blue}{\left(z - t\right) \cdot 0.016666666666666666}} \]
    9. Applied egg-rr72.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{+158}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(z - t\right) \cdot 0.016666666666666666}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq 1.9 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\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 75.1%

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

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

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} \]
      3. *-commutative75.3%

        \[\leadsto \color{blue}{x \cdot \frac{60}{z - t}} \]
    9. Simplified75.3%

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

    if -1.76000000000000007e146 < x < 1.89999999999999983e159

    1. Initial program 99.8%

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

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

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

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

    if 1.89999999999999983e159 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\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 72.7%

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

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

Alternative 11: 50.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+147} \lor \neg \left(x \leq 2.35 \cdot 10^{+166}\right):\\
\;\;\;\;\frac{60 \cdot x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.95000000000000008e147 or 2.35e166 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\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 74.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
    10. Simplified41.8%

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

    if -1.95000000000000008e147 < x < 2.35e166

    1. Initial program 99.8%

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

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

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

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

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

Alternative 12: 51.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.9 \cdot 10^{+147} \lor \neg \left(x \leq 4.3 \cdot 10^{+166}\right):\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -4.9e+147) (not (<= x 4.3e+166))) (* 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+147) || !(x <= 4.3e+166)) {
		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+147)) .or. (.not. (x <= 4.3d+166))) 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+147) || !(x <= 4.3e+166)) {
		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+147) or not (x <= 4.3e+166):
		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+147) || !(x <= 4.3e+166))
		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+147) || ~((x <= 4.3e+166)))
		tmp = 60.0 * (x / z);
	else
		tmp = a * 120.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.9e+147], N[Not[LessEqual[x, 4.3e+166]], $MachinePrecision]], 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^{+147} \lor \neg \left(x \leq 4.3 \cdot 10^{+166}\right):\\
\;\;\;\;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.8999999999999998e147 or 4.3e166 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\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 74.6%

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

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

    if -4.8999999999999998e147 < x < 4.3e166

    1. Initial program 99.8%

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

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

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

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

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

Alternative 13: 50.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+178} \lor \neg \left(x \leq 1.8 \cdot 10^{+163}\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 < -2.9e178 or 1.79999999999999989e163 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

      \[\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 76.0%

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

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

    if -2.9e178 < x < 1.79999999999999989e163

    1. Initial program 99.8%

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

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

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

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

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

Alternative 14: 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.8%

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

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

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

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

Alternative 15: 49.8% accurate, 4.3× speedup?

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

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

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

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

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

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

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

Developer Target 1: 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 2024139 
(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)))