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

Percentage Accurate: 99.4% → 99.8%
Time: 14.1s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.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.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. Add Preprocessing

Alternative 2: 83.2% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 97.0%

      \[\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 a around 0 91.0%

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

    if -1.9999999999999999e163 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000002e75

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    7. Applied egg-rr93.2%

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

Alternative 3: 58.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -150:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -1.95 \cdot 10^{-256}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-199}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -150 or 9.20000000000000047e-79 < a

    1. Initial program 99.9%

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

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

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

    if -150 < a < -1.9499999999999999e-256

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

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

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

    if -1.9499999999999999e-256 < a < 1.70000000000000003e-199

    1. Initial program 96.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. +-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.5%

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

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

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

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

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

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

    if 1.70000000000000003e-199 < a < 9.20000000000000047e-79

    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.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.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 y around inf 62.2%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{-60}{z - t}} \]
    9. Simplified62.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -150:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-256}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-79}:\\ \;\;\;\;y \cdot \frac{-60}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 58.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -230:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -1.32 \cdot 10^{-256}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-201}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -230 or 5.0999999999999999e-79 < a

    1. Initial program 99.9%

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

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

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

    if -230 < a < -1.32e-256

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

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

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

    if -1.32e-256 < a < 7.49999999999999987e-201

    1. Initial program 96.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. +-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.5%

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

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

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

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

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

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

    if 7.49999999999999987e-201 < a < 5.0999999999999999e-79

    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.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 y around inf 62.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -230:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.32 \cdot 10^{-256}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-201}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{-79}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 58.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -11500:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -8.1 \cdot 10^{-258}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-199}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -11500 or 5.8000000000000001e-78 < a

    1. Initial program 99.9%

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

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

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

    if -11500 < a < -8.1000000000000003e-258

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

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

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

    if -8.1000000000000003e-258 < a < 7.5000000000000003e-199

    1. Initial program 96.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. +-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.5%

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

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

    if 7.5000000000000003e-199 < a < 5.8000000000000001e-78

    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.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 y around inf 62.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -11500:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -8.1 \cdot 10^{-258}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-199}:\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-78}:\\ \;\;\;\;60 \cdot \frac{y}{t - z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -2e7 or 9.99999999999999927e-77 < (*.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. *-commutative99.9%

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

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

    if -2e7 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999927e-77

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

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

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

Alternative 7: 73.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -20000000:\\
\;\;\;\;a \cdot 120\\

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

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


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

    1. Initial program 99.9%

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

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

    if -2e7 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999927e-77

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

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

        \[\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 \]
    7. Applied egg-rr84.1%

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

    if 9.99999999999999927e-77 < (*.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.8%

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

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

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

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

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

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

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

Alternative 8: 73.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -20000000:\\
\;\;\;\;a \cdot 120\\

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

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


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

    1. Initial program 99.9%

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

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

    if -2e7 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999927e-77

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

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

    if 9.99999999999999927e-77 < (*.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.8%

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

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

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

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

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

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

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

Alternative 9: 58.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8500:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-258}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-101}:\\ \;\;\;\;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 -8500.0)
   (* a 120.0)
   (if (<= a -2.1e-258)
     (* -60.0 (/ (- x y) t))
     (if (<= a 1.08e-101) (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -8500.0) {
		tmp = a * 120.0;
	} else if (a <= -2.1e-258) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 1.08e-101) {
		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 <= (-8500.0d0)) then
        tmp = a * 120.0d0
    else if (a <= (-2.1d-258)) then
        tmp = (-60.0d0) * ((x - y) / t)
    else if (a <= 1.08d-101) 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 <= -8500.0) {
		tmp = a * 120.0;
	} else if (a <= -2.1e-258) {
		tmp = -60.0 * ((x - y) / t);
	} else if (a <= 1.08e-101) {
		tmp = 60.0 * (x / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -8500.0:
		tmp = a * 120.0
	elif a <= -2.1e-258:
		tmp = -60.0 * ((x - y) / t)
	elif a <= 1.08e-101:
		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 <= -8500.0)
		tmp = Float64(a * 120.0);
	elseif (a <= -2.1e-258)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	elseif (a <= 1.08e-101)
		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 <= -8500.0)
		tmp = a * 120.0;
	elseif (a <= -2.1e-258)
		tmp = -60.0 * ((x - y) / t);
	elseif (a <= 1.08e-101)
		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, -8500.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.1e-258], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.08e-101], 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 -8500:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-258}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{-101}:\\
\;\;\;\;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 < -8500 or 1.08e-101 < a

    1. Initial program 99.9%

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

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

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

    if -8500 < a < -2.0999999999999999e-258

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

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

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

    if -2.0999999999999999e-258 < a < 1.08e-101

    1. Initial program 97.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.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 58.1%

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

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

Alternative 10: 89.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

    if -9.50000000000000019e42 < y < 9.4999999999999999e34

    1. Initial program 99.8%

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

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

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

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

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

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

    if 9.4999999999999999e34 < y

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

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

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

Alternative 11: 52.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-258}:\\
\;\;\;\;\frac{60 \cdot y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.6000000000000001e-50 or 2.8999999999999999e-179 < a

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

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

    if -2.6000000000000001e-50 < a < -1.30000000000000009e-258

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(120 \cdot \frac{a}{y} - 60 \cdot \frac{1}{z - t}\right)} \]
    9. Taylor expanded in z around 0 54.4%

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot y}{t}} \]
      2. *-commutative41.0%

        \[\leadsto \frac{\color{blue}{y \cdot 60}}{t} \]
    12. Simplified41.0%

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

    if -1.30000000000000009e-258 < a < 2.8999999999999999e-179

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{-50}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-258}:\\ \;\;\;\;\frac{60 \cdot y}{t}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-179}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -9 \cdot 10^{-258}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.4000000000000003e-50 or 2.34999999999999988e-180 < a

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

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

    if -8.4000000000000003e-50 < a < -9.00000000000000017e-258

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(120 \cdot \frac{a}{y} - 60 \cdot \frac{1}{z - t}\right)} \]
    9. Taylor expanded in z around 0 54.4%

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

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

    if -9.00000000000000017e-258 < a < 2.34999999999999988e-180

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.4 \cdot 10^{-50}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-258}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{-180}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -3 \cdot 10^{-257}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.6e-48 or 4.8000000000000001e-179 < a

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

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

    if -8.6e-48 < a < -2.9999999999999999e-257

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(120 \cdot \frac{a}{y} - 60 \cdot \frac{1}{z - t}\right)} \]
    9. Taylor expanded in z around 0 54.4%

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

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

    if -2.9999999999999999e-257 < a < 4.8000000000000001e-179

    1. Initial program 97.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-48}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-257}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-179}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 58.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7200 \lor \neg \left(a \leq 1.8 \cdot 10^{-83}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7200 or 1.80000000000000006e-83 < a

    1. Initial program 99.9%

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

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

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

    if -7200 < a < 1.80000000000000006e-83

    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 a around 0 83.9%

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

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

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

Alternative 15: 53.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-226} \lor \neg \left(a \leq 7.6 \cdot 10^{-179}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.5e-226 or 7.59999999999999947e-179 < a

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

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

    if -5.5e-226 < a < 7.59999999999999947e-179

    1. Initial program 97.7%

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

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

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

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

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

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

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

Alternative 16: 52.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.4 \cdot 10^{-225} \lor \neg \left(a \leq 2.45 \cdot 10^{-195}\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.4e-225) (not (<= a 2.45e-195)))
   (* a 120.0)
   (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -8.4e-225) || !(a <= 2.45e-195)) {
		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.4d-225)) .or. (.not. (a <= 2.45d-195))) 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.4e-225) || !(a <= 2.45e-195)) {
		tmp = a * 120.0;
	} else {
		tmp = -60.0 * (x / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -8.4e-225) or not (a <= 2.45e-195):
		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.4e-225) || !(a <= 2.45e-195))
		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.4e-225) || ~((a <= 2.45e-195)))
		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.4e-225], N[Not[LessEqual[a, 2.45e-195]], $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.4 \cdot 10^{-225} \lor \neg \left(a \leq 2.45 \cdot 10^{-195}\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.40000000000000001e-225 or 2.4500000000000002e-195 < a

    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.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 -8.40000000000000001e-225 < a < 2.4500000000000002e-195

    1. Initial program 97.6%

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

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

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

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

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

Alternative 17: 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 18: 99.8% accurate, 1.0× speedup?

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

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

    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
  2. Add Preprocessing
  3. 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.8%

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

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

Alternative 19: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 60 \cdot \frac{x - y}{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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
60 \cdot \frac{x - y}{z - t} + 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. Add Preprocessing

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

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

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

    \[\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 2024150 
(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)))