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

Percentage Accurate: 99.5% → 99.8%
Time: 14.1s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 99.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, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-26}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\

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

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+75}:\\
\;\;\;\;\frac{\frac{x - y}{z - t}}{0.016666666666666666}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.3e81 or 3.40000000000000011e75 < t

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot -60}}{t} + a \cdot 120 \]
    10. Simplified83.5%

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

    if -3.3e81 < t < -4.4999999999999999e-26

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999999e-26 < t < 9.5000000000000005e-57

    1. Initial program 99.8%

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

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

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

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

    if 9.5000000000000005e-57 < t < 3.40000000000000011e75

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{60}{z - t}} \]
    10. Step-by-step derivation
      1. metadata-eval72.7%

        \[\leadsto \left(x - y\right) \cdot \frac{\color{blue}{\frac{1}{0.016666666666666666}}}{z - t} \]
      2. associate-/r*72.7%

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

        \[\leadsto \left(x - y\right) \cdot \frac{1}{\color{blue}{\left(z - t\right) \cdot 0.016666666666666666}} \]
      4. div-inv72.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+81}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-26}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-57}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+75}:\\ \;\;\;\;\frac{\frac{x - y}{z - t}}{0.016666666666666666}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.6% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \frac{-60}{z - t}} + a \cdot 120 \]
      5. /-rgt-identity89.2%

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

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

    if -5.0000000000000002e-23 < (*.f64 a #s(literal 120 binary64)) < 1.9999999999999999e-47

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

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

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

Alternative 4: 73.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+29}:\\
\;\;\;\;a \cdot 120\\

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

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


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

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999983e29 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999983e66

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 5: 73.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+42}:\\
\;\;\;\;a \cdot 120\\

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

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000007e42 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999983e66

    1. Initial program 99.7%

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 6: 54.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+40}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 4.7 \cdot 10^{-260}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\

\mathbf{elif}\;a \leq 5.1 \cdot 10^{+64}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4000000000000001e40 or 5.10000000000000024e64 < a

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e40 < a < 4.7e-260

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7e-260 < a < 5.10000000000000024e64

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
      2. clear-num52.6%

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

        \[\leadsto \frac{1}{\frac{z - t}{\color{blue}{x \cdot 60}}} \]
    9. Applied egg-rr52.6%

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

        \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \left(x \cdot 60\right)} \]
    11. Simplified52.6%

      \[\leadsto \color{blue}{\frac{1}{z - t} \cdot \left(x \cdot 60\right)} \]
    12. Step-by-step derivation
      1. associate-*l/52.8%

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

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

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

        \[\leadsto \color{blue}{\frac{60}{z - t} \cdot x} \]
      5. associate-/r/52.8%

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x}}} \]
    13. Applied egg-rr52.8%

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

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

Alternative 7: 54.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+39}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 3.05 \cdot 10^{-266}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.49999999999999971e39 or 5e64 < a

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.49999999999999971e39 < a < 3.05e-266

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.05e-266 < a < 5e64

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 88.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.24999999999999997e101 or 1.12e-32 < x

    1. Initial program 98.9%

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

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

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

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

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

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

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

    if -1.24999999999999997e101 < x < 1.12e-32

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

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

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

Alternative 9: 88.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.8e100 or 2.3000000000000001e-32 < x

    1. Initial program 98.9%

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

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

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

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

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

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

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

    if -1.8e100 < x < 2.3000000000000001e-32

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \frac{-60}{z - t}} + a \cdot 120 \]
      5. /-rgt-identity92.6%

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

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

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

Alternative 10: 51.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-270}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.9999999999999994e-37 or 1.0999999999999999e-229 < a

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e-37 < a < 1.2499999999999999e-270

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2499999999999999e-270 < a < 1.0999999999999999e-229

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-36}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-270}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-229}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 51.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-274}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\

\mathbf{elif}\;a \leq 1.06 \cdot 10^{-213}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e-35 or 1.06000000000000001e-213 < a

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e-35 < a < 2.19999999999999995e-274

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.19999999999999995e-274 < a < 1.06000000000000001e-213

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-35}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-274}:\\ \;\;\;\;-60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-213}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 74.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+40} \lor \neg \left(a \leq 5 \cdot 10^{+64}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.50000000000000002e40 or 5e64 < a

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000002e40 < a < 5e64

    1. Initial program 99.7%

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

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

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

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

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

Alternative 13: 55.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-25} \lor \neg \left(a \leq 5 \cdot 10^{+64}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.45e-25 or 5e64 < a

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45e-25 < a < 5e64

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 50.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.50000000000000004e-26 or 9.9999999999999995e-214 < a

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000004e-26 < a < 9.9999999999999995e-214

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 51.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+243}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.5999999999999997e233 < x < 2.20000000000000009e243

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000009e243 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-60 \cdot \frac{x}{t}} \]
    9. Step-by-step derivation
      1. clear-num63.9%

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

        \[\leadsto \color{blue}{\frac{-60}{\frac{t}{x}}} \]
    10. Applied egg-rr64.1%

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

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

Alternative 16: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 17: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 18: 50.3% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{120 \cdot a} \]
  6. Final simplification46.9%

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

Developer Target 1: 99.8% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024191 
(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)))