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

Percentage Accurate: 99.3% → 99.8%
Time: 11.9s
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} \\ a \cdot 120 - \frac{60}{\frac{z - t}{y - x}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- (* a 120.0) (/ 60.0 (/ (- z t) (- y x)))))
double code(double x, double y, double z, double t, double a) {
	return (a * 120.0) - (60.0 / ((z - t) / (y - x)));
}
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 / ((z - t) / (y - x)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return (a * 120.0) - (60.0 / ((z - t) / (y - x)));
}
def code(x, y, z, t, a):
	return (a * 120.0) - (60.0 / ((z - t) / (y - x)))
function code(x, y, z, t, a)
	return Float64(Float64(a * 120.0) - Float64(60.0 / Float64(Float64(z - t) / Float64(y - x))))
end
function tmp = code(x, y, z, t, a)
	tmp = (a * 120.0) - (60.0 / ((z - t) / (y - x)));
end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

Alternative 2: 67.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+163} \lor \neg \left(x - y \leq 5 \cdot 10^{+111}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


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

    1. Initial program 98.1%

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

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

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

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

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

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

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

    if -9.9999999999999994e162 < (-.f64 x y) < 4.9999999999999997e111

    1. Initial program 99.8%

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

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

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

Alternative 3: 72.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -100000:\\
\;\;\;\;a \cdot 120 - \frac{60}{\frac{z}{y}}\\

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

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


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

    1. Initial program 98.2%

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

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

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

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

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

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

      \[\leadsto \frac{60}{\frac{z - t}{\color{blue}{-1 \cdot y}}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. neg-mul-186.7%

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

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

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

        \[\leadsto \frac{60}{\color{blue}{\frac{-1 \cdot z}{y}}} + a \cdot 120 \]
      2. neg-mul-178.5%

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

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

    if -1e5 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-14

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

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

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

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

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

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

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

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

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

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

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

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

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

    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 x around inf 89.5%

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

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

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

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

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

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

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

Alternative 4: 72.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 98.2%

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

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

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

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

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

    if -1e5 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-14

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

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

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

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

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

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

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

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

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

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

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

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

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

    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 x around inf 89.5%

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

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

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

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

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

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

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

Alternative 5: 73.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 98.2%

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

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

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

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

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

    if -1e5 < (*.f64 a #s(literal 120 binary64)) < 1e30

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e30 < (*.f64 a #s(literal 120 binary64))

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

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

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

Alternative 6: 67.3% accurate, 0.6× speedup?

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

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

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


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

    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*97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e162 < (-.f64 x y) < 4.9999999999999997e111

    1. Initial program 99.8%

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

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

    if 4.9999999999999997e111 < (-.f64 x y)

    1. Initial program 98.5%

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

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

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

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

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

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

Alternative 7: 89.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.2e115 or 3.7000000000000001e99 < x

    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*98.7%

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

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

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

    if -1.2e115 < x < 3.7000000000000001e99

    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. 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. Taylor expanded in x around 0 91.7%

      \[\leadsto \frac{60}{\frac{z - t}{\color{blue}{-1 \cdot y}}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. neg-mul-191.7%

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

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

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

Alternative 8: 89.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.2e115 or 2.54999999999999976e99 < x

    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*98.7%

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

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

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

    if -1.2e115 < x < 2.54999999999999976e99

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 80.8% accurate, 0.6× speedup?

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

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

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

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


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

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

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

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

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

      \[\leadsto \frac{60}{\frac{z - t}{\color{blue}{-1 \cdot y}}} + a \cdot 120 \]
    8. Step-by-step derivation
      1. neg-mul-196.4%

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

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

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

    if -1.1e180 < y < 1.6000000000000001e153

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

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

    if 1.6000000000000001e153 < y

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 57.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+175} \lor \neg \left(x \leq 1.4 \cdot 10^{+113}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.0000000000000002e175 or 1.39999999999999999e113 < x

    1. Initial program 98.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. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

    if -3.0000000000000002e175 < x < 1.39999999999999999e113

    1. Initial program 99.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+175} \lor \neg \left(x \leq 1.4 \cdot 10^{+113}\right):\\ \;\;\;\;60 \cdot \frac{x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \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.0%

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

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

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

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

Alternative 12: 51.7% accurate, 1.3× speedup?

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

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

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


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

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

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

    if 5.6000000000000005e157 < y

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60}{-1} \cdot \frac{y}{-\left(z - t\right)}} + a \cdot 120 \]
      5. metadata-eval69.9%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 51.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+137}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.5e137

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

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

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

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

    if 1.5e137 < x

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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