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

Percentage Accurate: 99.5% → 99.8%
Time: 12.5s
Alternatives: 15
Speedup: 1.1×

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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

    \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + \left(60 \cdot \frac{x}{z - t} + 120 \cdot a\right)} \]
  4. Step-by-step derivation
    1. associate-+r+N/A

      \[\leadsto \color{blue}{\left(-60 \cdot \frac{y}{z - t} + 60 \cdot \frac{x}{z - t}\right) + 120 \cdot a} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{\left(60 \cdot \frac{x}{z - t} + -60 \cdot \frac{y}{z - t}\right)} + 120 \cdot a \]
    3. metadata-evalN/A

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + \color{blue}{\frac{60}{-1}} \cdot \frac{y}{z - t}\right) + 120 \cdot a \]
    4. times-fracN/A

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + \color{blue}{\frac{60 \cdot y}{-1 \cdot \left(z - t\right)}}\right) + 120 \cdot a \]
    5. metadata-evalN/A

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + \frac{\color{blue}{\left(-60 \cdot -1\right)} \cdot y}{-1 \cdot \left(z - t\right)}\right) + 120 \cdot a \]
    6. associate-*r*N/A

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + \frac{\color{blue}{-60 \cdot \left(-1 \cdot y\right)}}{-1 \cdot \left(z - t\right)}\right) + 120 \cdot a \]
    7. times-fracN/A

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

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + \color{blue}{60} \cdot \frac{-1 \cdot y}{z - t}\right) + 120 \cdot a \]
    9. neg-mul-1N/A

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + 60 \cdot \frac{\color{blue}{\mathsf{neg}\left(y\right)}}{z - t}\right) + 120 \cdot a \]
    10. distribute-neg-fracN/A

      \[\leadsto \left(60 \cdot \frac{x}{z - t} + 60 \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z - t}\right)\right)}\right) + 120 \cdot a \]
    11. distribute-lft-inN/A

      \[\leadsto \color{blue}{60 \cdot \left(\frac{x}{z - t} + \left(\mathsf{neg}\left(\frac{y}{z - t}\right)\right)\right)} + 120 \cdot a \]
    12. sub-negN/A

      \[\leadsto 60 \cdot \color{blue}{\left(\frac{x}{z - t} - \frac{y}{z - t}\right)} + 120 \cdot a \]
    13. div-subN/A

      \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} + 120 \cdot a \]
    14. lower-fma.f64N/A

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

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

Alternative 2: 73.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-136}:\\ \;\;\;\;\mathsf{fma}\left(60, \frac{-x}{t}, 120 \cdot a\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_1 -2e+51)
     t_1
     (if (<= t_1 -5e-136)
       (fma 60.0 (/ (- x) t) (* 120.0 a))
       (if (<= t_1 2e+57) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_1 <= -2e+51) {
		tmp = t_1;
	} else if (t_1 <= -5e-136) {
		tmp = fma(60.0, (-x / t), (120.0 * a));
	} else if (t_1 <= 2e+57) {
		tmp = 120.0 * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_1 <= -2e+51)
		tmp = t_1;
	elseif (t_1 <= -5e-136)
		tmp = fma(60.0, Float64(Float64(-x) / t), Float64(120.0 * a));
	elseif (t_1 <= 2e+57)
		tmp = Float64(120.0 * a);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], t$95$1, If[LessEqual[t$95$1, -5e-136], N[(60.0 * N[((-x) / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+57], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-136}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{-x}{t}, 120 \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 2.0000000000000001e57 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

    if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e-136

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x}{z - t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(60, \frac{x}{\color{blue}{-1 \cdot t}}, 120 \cdot a\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(60, \frac{x}{\color{blue}{\mathsf{neg}\left(t\right)}}, 120 \cdot a\right) \]
      2. lower-neg.f6475.5

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

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

    if -5.0000000000000002e-136 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e57

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6480.9

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified80.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -2 \cdot 10^{+51}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{-136}:\\ \;\;\;\;\mathsf{fma}\left(60, \frac{-x}{t}, 120 \cdot a\right)\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 2 \cdot 10^{+57}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-136}:\\ \;\;\;\;\mathsf{fma}\left(120, a, \frac{x \cdot -60}{t}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_1 -2e+51)
     t_1
     (if (<= t_1 -5e-136)
       (fma 120.0 a (/ (* x -60.0) t))
       (if (<= t_1 2e+57) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_1 <= -2e+51) {
		tmp = t_1;
	} else if (t_1 <= -5e-136) {
		tmp = fma(120.0, a, ((x * -60.0) / t));
	} else if (t_1 <= 2e+57) {
		tmp = 120.0 * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_1 <= -2e+51)
		tmp = t_1;
	elseif (t_1 <= -5e-136)
		tmp = fma(120.0, a, Float64(Float64(x * -60.0) / t));
	elseif (t_1 <= 2e+57)
		tmp = Float64(120.0 * a);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], t$95$1, If[LessEqual[t$95$1, -5e-136], N[(120.0 * a + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+57], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-136}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{x \cdot -60}{t}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 2.0000000000000001e57 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

    if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e-136

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x}{z - t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t} + 120 \cdot a} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{120 \cdot a + -60 \cdot \frac{x}{t}} \]
      2. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{-60 \cdot x}{t}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{-60 \cdot x}{t}}\right) \]
      5. lower-*.f6475.5

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

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

    if -5.0000000000000002e-136 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e57

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6480.9

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified80.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -2 \cdot 10^{+51}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq -5 \cdot 10^{-136}:\\ \;\;\;\;\mathsf{fma}\left(120, a, \frac{x \cdot -60}{t}\right)\\ \mathbf{elif}\;\frac{60 \cdot \left(x - y\right)}{z - t} \leq 2 \cdot 10^{+57}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+241}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\

\mathbf{elif}\;t\_2 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e241 or 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6466.4

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified66.4%

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

    if -2.0000000000000001e241 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + \left(60 \cdot \frac{x}{z - t} + 120 \cdot a\right)} \]
    4. Step-by-step derivation
      1. associate-+r+N/A

        \[\leadsto \color{blue}{\left(-60 \cdot \frac{y}{z - t} + 60 \cdot \frac{x}{z - t}\right) + 120 \cdot a} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(60 \cdot \frac{x}{z - t} + -60 \cdot \frac{y}{z - t}\right)} + 120 \cdot a \]
      3. metadata-evalN/A

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + \color{blue}{\frac{60}{-1}} \cdot \frac{y}{z - t}\right) + 120 \cdot a \]
      4. times-fracN/A

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + \color{blue}{\frac{60 \cdot y}{-1 \cdot \left(z - t\right)}}\right) + 120 \cdot a \]
      5. metadata-evalN/A

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + \frac{\color{blue}{\left(-60 \cdot -1\right)} \cdot y}{-1 \cdot \left(z - t\right)}\right) + 120 \cdot a \]
      6. associate-*r*N/A

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + \frac{\color{blue}{-60 \cdot \left(-1 \cdot y\right)}}{-1 \cdot \left(z - t\right)}\right) + 120 \cdot a \]
      7. times-fracN/A

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

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + \color{blue}{60} \cdot \frac{-1 \cdot y}{z - t}\right) + 120 \cdot a \]
      9. neg-mul-1N/A

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + 60 \cdot \frac{\color{blue}{\mathsf{neg}\left(y\right)}}{z - t}\right) + 120 \cdot a \]
      10. distribute-neg-fracN/A

        \[\leadsto \left(60 \cdot \frac{x}{z - t} + 60 \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{y}{z - t}\right)\right)}\right) + 120 \cdot a \]
      11. distribute-lft-inN/A

        \[\leadsto \color{blue}{60 \cdot \left(\frac{x}{z - t} + \left(\mathsf{neg}\left(\frac{y}{z - t}\right)\right)\right)} + 120 \cdot a \]
      12. sub-negN/A

        \[\leadsto 60 \cdot \color{blue}{\left(\frac{x}{z - t} - \frac{y}{z - t}\right)} + 120 \cdot a \]
      13. div-subN/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} + 120 \cdot a \]
      14. lower-fma.f64N/A

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t} + 120 \cdot a} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{120 \cdot a + 60 \cdot \frac{x - y}{z - t}} \]
      2. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(120, a, \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}}\right) \]
      4. lower-/.f64N/A

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

        \[\leadsto \mathsf{fma}\left(120, a, \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t}\right) \]
      6. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(120 + 60 \cdot \frac{x - y}{a \cdot \left(z - t\right)}\right)} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(120 + 60 \cdot \frac{x - y}{a \cdot \left(z - t\right)}\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(60 \cdot \frac{x - y}{a \cdot \left(z - t\right)} + 120\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(60, \frac{x - y}{a \cdot \left(z - t\right)}, 120\right)} \]
      4. lower-/.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(60, \color{blue}{\frac{x - y}{a \cdot \left(z - t\right)}}, 120\right) \]
      5. lower--.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(60, \frac{\color{blue}{x - y}}{a \cdot \left(z - t\right)}, 120\right) \]
      6. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z - t}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot -60}}{z - t} \]
      3. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z - t}} \]
      4. metadata-evalN/A

        \[\leadsto y \cdot \frac{\color{blue}{\mathsf{neg}\left(60\right)}}{z - t} \]
      5. distribute-neg-fracN/A

        \[\leadsto y \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{60}{z - t}\right)\right)} \]
      6. metadata-evalN/A

        \[\leadsto y \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{60 \cdot 1}}{z - t}\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto y \cdot \left(\mathsf{neg}\left(\color{blue}{60 \cdot \frac{1}{z - t}}\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(60 \cdot \frac{1}{z - t}\right)\right)} \]
      9. associate-*r/N/A

        \[\leadsto y \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{60 \cdot 1}{z - t}}\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto y \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{60}}{z - t}\right)\right) \]
      11. distribute-neg-fracN/A

        \[\leadsto y \cdot \color{blue}{\frac{\mathsf{neg}\left(60\right)}{z - t}} \]
      12. metadata-evalN/A

        \[\leadsto y \cdot \frac{\color{blue}{-60}}{z - t} \]
      13. lower-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{-60}{z - t}} \]
      14. lower--.f6452.7

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

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

    if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6471.5

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified71.5%

      \[\leadsto \color{blue}{120 \cdot a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 83.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
   (if (<= t_1 -2e+62)
     t_1
     (if (<= t_1 5e+118) (fma -60.0 (/ y (- z t)) (* 120.0 a)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (60.0 * (x - y)) / (z - t);
	double tmp;
	if (t_1 <= -2e+62) {
		tmp = t_1;
	} else if (t_1 <= 5e+118) {
		tmp = fma(-60.0, (y / (z - t)), (120.0 * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
	tmp = 0.0
	if (t_1 <= -2e+62)
		tmp = t_1;
	elseif (t_1 <= 5e+118)
		tmp = fma(-60.0, Float64(y / Float64(z - t)), Float64(120.0 * a));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+62], t$95$1, If[LessEqual[t$95$1, 5e+118], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.00000000000000007e62 or 4.99999999999999972e118 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

    if -2.00000000000000007e62 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e118

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-60, \color{blue}{\frac{y}{z - t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 73.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 2.0000000000000001e57 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

    if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e57

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6475.4

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified75.4%

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

Alternative 7: 60.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+64}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\

\mathbf{elif}\;t\_1 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.00000000000000009e64

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. lower--.f6450.0

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    8. Simplified50.0%

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

    if -4.00000000000000009e64 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6470.1

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified70.1%

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

    if 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6464.9

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified64.9%

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 60.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6454.6

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified54.6%

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

    if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6471.5

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified71.5%

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

Alternative 9: 53.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\

\mathbf{elif}\;t\_1 \leq 10^{+193}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. lower--.f6448.6

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    8. Simplified48.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
      4. lower-*.f6431.1

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
    11. Simplified31.1%

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

    if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000007e193

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6467.9

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified67.9%

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

    if 1.00000000000000007e193 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6470.0

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified70.0%

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    9. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} \]
      2. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot -60\right)} \cdot y}{t} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(-60 \cdot y\right)}}{t} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(-60 \cdot y\right)}{t}} \]
      5. associate-*r*N/A

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot -60\right) \cdot y}}{t} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{60} \cdot y}{t} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot 60}}{t} \]
      8. lower-*.f6450.9

        \[\leadsto \frac{\color{blue}{y \cdot 60}}{t} \]
    11. Simplified50.9%

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

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

Alternative 10: 53.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. lower--.f6448.6

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    8. Simplified48.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
      4. lower-*.f6431.1

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
    11. Simplified31.1%

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

    if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999993e219

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6467.4

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified67.4%

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

    if 1.99999999999999993e219 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. lower--.f6450.8

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    9. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-60 \cdot y}{z}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y \cdot -60}}{z} \]
      4. lower-*.f6434.7

        \[\leadsto \frac{\color{blue}{y \cdot -60}}{z} \]
    11. Simplified34.7%

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

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

Alternative 11: 53.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\

\mathbf{elif}\;t\_1 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. lower--.f6448.6

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    8. Simplified48.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
      4. lower-*.f6431.1

        \[\leadsto \frac{\color{blue}{x \cdot 60}}{z} \]
    11. Simplified31.1%

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

    if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6469.8

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified69.8%

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

    if 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6464.9

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified64.9%

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

      \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    10. Step-by-step derivation
      1. lower-/.f6429.7

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    11. Simplified29.7%

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

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

Alternative 12: 53.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\

\mathbf{elif}\;t\_1 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z}} \]
      2. lower-/.f64N/A

        \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z}} \]
      3. lower--.f6448.6

        \[\leadsto 60 \cdot \frac{\color{blue}{x - y}}{z} \]
    8. Simplified48.6%

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

      \[\leadsto 60 \cdot \color{blue}{\frac{x}{z}} \]
    10. Step-by-step derivation
      1. lower-/.f6431.0

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

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

    if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6469.8

        \[\leadsto \color{blue}{120 \cdot a} \]
    5. Simplified69.8%

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

    if 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6464.9

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified64.9%

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

      \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    10. Step-by-step derivation
      1. lower-/.f6429.7

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    11. Simplified29.7%

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

Alternative 13: 54.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.0000000000000001e182 or 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{60 \cdot \left(x - y\right)}}{z - t} \]
      4. lower--.f64N/A

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{-60 \cdot \frac{x - y}{t}} \]
      2. lower-/.f64N/A

        \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
      3. lower--.f6464.9

        \[\leadsto -60 \cdot \frac{\color{blue}{x - y}}{t} \]
    8. Simplified64.9%

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

      \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    10. Step-by-step derivation
      1. lower-/.f6432.9

        \[\leadsto -60 \cdot \color{blue}{\frac{x}{t}} \]
    11. Simplified32.9%

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

    if -1.0000000000000001e182 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-*.f6464.6

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

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

Alternative 14: 89.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma 60.0 (/ x (- z t)) (* 120.0 a))))
   (if (<= x -1.05e+73)
     t_1
     (if (<= x 6.6e-40) (fma -60.0 (/ y (- z t)) (* 120.0 a)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(60.0, (x / (z - t)), (120.0 * a));
	double tmp;
	if (x <= -1.05e+73) {
		tmp = t_1;
	} else if (x <= 6.6e-40) {
		tmp = fma(-60.0, (y / (z - t)), (120.0 * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a))
	tmp = 0.0
	if (x <= -1.05e+73)
		tmp = t_1;
	elseif (x <= 6.6e-40)
		tmp = fma(-60.0, Float64(y / Float64(z - t)), Float64(120.0 * a));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+73], t$95$1, If[LessEqual[x, 6.6e-40], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.0500000000000001e73 or 6.59999999999999986e-40 < x

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{60 \cdot \frac{x}{z - t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(60, \color{blue}{\frac{x}{z - t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

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

    if -1.0500000000000001e73 < x < 6.59999999999999986e-40

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t} + 120 \cdot a} \]
    4. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)} \]
      2. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-60, \color{blue}{\frac{y}{z - t}}, 120 \cdot a\right) \]
      3. lower--.f64N/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 50.2% accurate, 5.2× speedup?

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  4. Step-by-step derivation
    1. lower-*.f6453.3

      \[\leadsto \color{blue}{120 \cdot a} \]
  5. Simplified53.3%

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Add Preprocessing

Developer Target 1: 99.8% accurate, 0.8× 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 2024215 
(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)))