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

Percentage Accurate: 99.3% → 99.8%
Time: 14.2s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 99.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 2: 72.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \cdot 120 \leq -1.5 \cdot 10^{-80}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{60}{\color{blue}{0 - \left(z - t\right)}} + a \cdot 120 \]
      10. sub-neg93.3%

        \[\leadsto y \cdot \frac{60}{0 - \color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      11. +-commutative93.3%

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

        \[\leadsto y \cdot \frac{60}{\color{blue}{\left(0 - \left(-t\right)\right) - z}} + a \cdot 120 \]
      13. neg-sub093.3%

        \[\leadsto y \cdot \frac{60}{\color{blue}{\left(-\left(-t\right)\right)} - z} + a \cdot 120 \]
      14. remove-double-neg93.3%

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

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

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

    if -5.00000000000000018e61 < (*.f64 a #s(literal 120 binary64)) < -1.50000000000000004e-80

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

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

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

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

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

    if -1.50000000000000004e-80 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999999e45

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e45 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.9%

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

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

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

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

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

Alternative 3: 73.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1.5 \cdot 10^{-80} \lor \neg \left(a \cdot 120 \leq 10^{+46}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 120 binary64)) < -1.50000000000000004e-80 or 9.9999999999999999e45 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 99.9%

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

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

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

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

    if -1.50000000000000004e-80 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999999e45

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.39999999999999991e32 or 3.5e-41 < y

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{60}{z - t}\right)} + a \cdot 120 \]
      8. distribute-neg-frac288.7%

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

        \[\leadsto y \cdot \frac{60}{\color{blue}{0 - \left(z - t\right)}} + a \cdot 120 \]
      10. sub-neg88.7%

        \[\leadsto y \cdot \frac{60}{0 - \color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      11. +-commutative88.7%

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

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

        \[\leadsto y \cdot \frac{60}{\color{blue}{\left(-\left(-t\right)\right)} - z} + a \cdot 120 \]
      14. remove-double-neg88.7%

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

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

    if -2.39999999999999991e32 < y < 3.5e-41

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 82.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+181}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+143}:\\
\;\;\;\;a \cdot 120 + x \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot t\_1\\


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

    1. Initial program 99.7%

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

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

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

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

    if -2.5000000000000002e181 < y < 1.12e143

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if 1.12e143 < y

    1. Initial program 99.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{60 \cdot \left(x - y\right)}{z - t}} \]
    8. Step-by-step derivation
      1. *-commutative99.5%

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

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

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

Alternative 6: 73.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-82} \lor \neg \left(a \leq 5.2 \cdot 10^{+45}\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 -1.4e-82) (not (<= a 5.2e+45)))
   (* 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 <= -1.4e-82) || !(a <= 5.2e+45)) {
		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 <= (-1.4d-82)) .or. (.not. (a <= 5.2d+45))) 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 <= -1.4e-82) || !(a <= 5.2e+45)) {
		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 <= -1.4e-82) or not (a <= 5.2e+45):
		tmp = a * 120.0
	else:
		tmp = 60.0 * ((x - y) / (z - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.4e-82) || !(a <= 5.2e+45))
		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 <= -1.4e-82) || ~((a <= 5.2e+45)))
		tmp = a * 120.0;
	else
		tmp = 60.0 * ((x - y) / (z - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.4e-82], N[Not[LessEqual[a, 5.2e+45]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-82} \lor \neg \left(a \leq 5.2 \cdot 10^{+45}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.40000000000000012e-82 or 5.20000000000000014e45 < a

    1. Initial program 99.9%

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

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

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

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

    if -1.40000000000000012e-82 < a < 5.20000000000000014e45

    1. Initial program 99.7%

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

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

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

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

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

Alternative 7: 58.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+181} \lor \neg \left(y \leq 1.2 \cdot 10^{+144}\right):\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.2e181 or 1.2e144 < y

    1. Initial program 99.6%

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z - t}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-171.5%

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

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

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

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

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

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

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

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

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

    if -3.2e181 < y < 1.2e144

    1. Initial program 99.8%

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

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

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

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

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

Alternative 8: 58.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+143}:\\
\;\;\;\;a \cdot 120\\

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


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

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z - t}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-174.6%

        \[\leadsto 60 \cdot \color{blue}{\left(-\frac{y}{z - t}\right)} \]
      2. distribute-neg-frac274.6%

        \[\leadsto 60 \cdot \color{blue}{\frac{y}{-\left(z - t\right)}} \]
      3. neg-sub074.6%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{0 - \left(z - t\right)}} \]
      4. sub-neg74.6%

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(0 - \left(-t\right)\right) - z}} \]
      7. neg-sub074.6%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z} \]
      8. remove-double-neg74.6%

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

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

    if -5.2e181 < y < 3.8999999999999998e143

    1. Initial program 99.8%

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

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

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

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

    if 3.8999999999999998e143 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{60}{z - t}\right)} + a \cdot 120 \]
      8. distribute-neg-frac287.2%

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

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

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

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

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

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

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

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

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

Alternative 9: 50.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.2 \cdot 10^{+144}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+159}:\\
\;\;\;\;y \cdot \frac{60}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 7.1999999999999995e144

    1. Initial program 99.8%

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

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

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

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

    if 7.1999999999999995e144 < y < 3.79999999999999965e159

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-\frac{60}{z - t}\right)} + a \cdot 120 \]
      8. distribute-neg-frac286.7%

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

        \[\leadsto y \cdot \frac{60}{\color{blue}{0 - \left(z - t\right)}} + a \cdot 120 \]
      10. sub-neg86.7%

        \[\leadsto y \cdot \frac{60}{0 - \color{blue}{\left(z + \left(-t\right)\right)}} + a \cdot 120 \]
      11. +-commutative86.7%

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

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

        \[\leadsto y \cdot \frac{60}{\color{blue}{\left(-\left(-t\right)\right)} - z} + a \cdot 120 \]
      14. remove-double-neg86.7%

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

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

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

    if 3.79999999999999965e159 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 50.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.2 \cdot 10^{+145}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+160}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 8.2000000000000003e145

    1. Initial program 99.8%

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

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

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

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

    if 8.2000000000000003e145 < y < 1.09999999999999996e160

    1. Initial program 99.3%

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z - t}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-186.2%

        \[\leadsto 60 \cdot \color{blue}{\left(-\frac{y}{z - t}\right)} \]
      2. distribute-neg-frac286.2%

        \[\leadsto 60 \cdot \color{blue}{\frac{y}{-\left(z - t\right)}} \]
      3. neg-sub086.2%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{0 - \left(z - t\right)}} \]
      4. sub-neg86.2%

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(0 - \left(-t\right)\right) - z}} \]
      7. neg-sub086.2%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z} \]
      8. remove-double-neg86.2%

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

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

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

    if 1.09999999999999996e160 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 12: 51.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{+145}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.4999999999999998e145

    1. Initial program 99.8%

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

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

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

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

    if 4.4999999999999998e145 < y

    1. Initial program 99.5%

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z - t}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-169.2%

        \[\leadsto 60 \cdot \color{blue}{\left(-\frac{y}{z - t}\right)} \]
      2. distribute-neg-frac269.2%

        \[\leadsto 60 \cdot \color{blue}{\frac{y}{-\left(z - t\right)}} \]
      3. neg-sub069.2%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{0 - \left(z - t\right)}} \]
      4. sub-neg69.2%

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(0 - \left(-t\right)\right) - z}} \]
      7. neg-sub069.2%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z} \]
      8. remove-double-neg69.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.5 \cdot 10^{+145}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.4 \cdot 10^{+145}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.39999999999999992e145

    1. Initial program 99.8%

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

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

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

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

    if 2.39999999999999992e145 < y

    1. Initial program 99.5%

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

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

      \[\leadsto 60 \cdot \color{blue}{\left(-1 \cdot \frac{y}{z - t}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-169.2%

        \[\leadsto 60 \cdot \color{blue}{\left(-\frac{y}{z - t}\right)} \]
      2. distribute-neg-frac269.2%

        \[\leadsto 60 \cdot \color{blue}{\frac{y}{-\left(z - t\right)}} \]
      3. neg-sub069.2%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{0 - \left(z - t\right)}} \]
      4. sub-neg69.2%

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

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

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(0 - \left(-t\right)\right) - z}} \]
      7. neg-sub069.2%

        \[\leadsto 60 \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - z} \]
      8. remove-double-neg69.2%

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

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

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

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

Alternative 14: 50.1% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

Reproduce

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