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

Percentage Accurate: 99.3% → 99.8%
Time: 16.6s
Alternatives: 19
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 19 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, 0.1× speedup?

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

\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\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. Step-by-step derivation
    1. +-commutative99.8%

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

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

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

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

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

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

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

Alternative 2: 58.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{60}{\frac{z}{x - y}}\\ t_2 := \left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{if}\;a \leq -1.1 \cdot 10^{-74}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-225}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-206}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-151}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-102} \lor \neg \left(a \leq 2.9 \cdot 10^{-76}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ 60.0 (/ z (- x y)))) (t_2 (* (- x y) (/ -60.0 t))))
   (if (<= a -1.1e-74)
     (* a 120.0)
     (if (<= a 5.4e-225)
       t_2
       (if (<= a 6.6e-206)
         t_1
         (if (<= a 7.6e-151)
           t_2
           (if (<= a 2.2e-106)
             t_1
             (if (or (<= a 1.1e-102) (not (<= a 2.9e-76)))
               (* a 120.0)
               t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = 60.0 / (z / (x - y));
	double t_2 = (x - y) * (-60.0 / t);
	double tmp;
	if (a <= -1.1e-74) {
		tmp = a * 120.0;
	} else if (a <= 5.4e-225) {
		tmp = t_2;
	} else if (a <= 6.6e-206) {
		tmp = t_1;
	} else if (a <= 7.6e-151) {
		tmp = t_2;
	} else if (a <= 2.2e-106) {
		tmp = t_1;
	} else if ((a <= 1.1e-102) || !(a <= 2.9e-76)) {
		tmp = a * 120.0;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 60.0d0 / (z / (x - y))
    t_2 = (x - y) * ((-60.0d0) / t)
    if (a <= (-1.1d-74)) then
        tmp = a * 120.0d0
    else if (a <= 5.4d-225) then
        tmp = t_2
    else if (a <= 6.6d-206) then
        tmp = t_1
    else if (a <= 7.6d-151) then
        tmp = t_2
    else if (a <= 2.2d-106) then
        tmp = t_1
    else if ((a <= 1.1d-102) .or. (.not. (a <= 2.9d-76))) then
        tmp = a * 120.0d0
    else
        tmp = t_2
    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 / (x - y));
	double t_2 = (x - y) * (-60.0 / t);
	double tmp;
	if (a <= -1.1e-74) {
		tmp = a * 120.0;
	} else if (a <= 5.4e-225) {
		tmp = t_2;
	} else if (a <= 6.6e-206) {
		tmp = t_1;
	} else if (a <= 7.6e-151) {
		tmp = t_2;
	} else if (a <= 2.2e-106) {
		tmp = t_1;
	} else if ((a <= 1.1e-102) || !(a <= 2.9e-76)) {
		tmp = a * 120.0;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 / (z / (x - y))
	t_2 = (x - y) * (-60.0 / t)
	tmp = 0
	if a <= -1.1e-74:
		tmp = a * 120.0
	elif a <= 5.4e-225:
		tmp = t_2
	elif a <= 6.6e-206:
		tmp = t_1
	elif a <= 7.6e-151:
		tmp = t_2
	elif a <= 2.2e-106:
		tmp = t_1
	elif (a <= 1.1e-102) or not (a <= 2.9e-76):
		tmp = a * 120.0
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(60.0 / Float64(z / Float64(x - y)))
	t_2 = Float64(Float64(x - y) * Float64(-60.0 / t))
	tmp = 0.0
	if (a <= -1.1e-74)
		tmp = Float64(a * 120.0);
	elseif (a <= 5.4e-225)
		tmp = t_2;
	elseif (a <= 6.6e-206)
		tmp = t_1;
	elseif (a <= 7.6e-151)
		tmp = t_2;
	elseif (a <= 2.2e-106)
		tmp = t_1;
	elseif ((a <= 1.1e-102) || !(a <= 2.9e-76))
		tmp = Float64(a * 120.0);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = 60.0 / (z / (x - y));
	t_2 = (x - y) * (-60.0 / t);
	tmp = 0.0;
	if (a <= -1.1e-74)
		tmp = a * 120.0;
	elseif (a <= 5.4e-225)
		tmp = t_2;
	elseif (a <= 6.6e-206)
		tmp = t_1;
	elseif (a <= 7.6e-151)
		tmp = t_2;
	elseif (a <= 2.2e-106)
		tmp = t_1;
	elseif ((a <= 1.1e-102) || ~((a <= 2.9e-76)))
		tmp = a * 120.0;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e-74], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.4e-225], t$95$2, If[LessEqual[a, 6.6e-206], t$95$1, If[LessEqual[a, 7.6e-151], t$95$2, If[LessEqual[a, 2.2e-106], t$95$1, If[Or[LessEqual[a, 1.1e-102], N[Not[LessEqual[a, 2.9e-76]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z}{x - y}}\\
t_2 := \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{-74}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 7.6 \cdot 10^{-151}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-102} \lor \neg \left(a \leq 2.9 \cdot 10^{-76}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.10000000000000005e-74 or 2.19999999999999994e-106 < a < 1.10000000000000006e-102 or 2.9000000000000002e-76 < 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 73.3%

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

    if -1.10000000000000005e-74 < a < 5.39999999999999984e-225 or 6.59999999999999961e-206 < a < 7.5999999999999994e-151 or 1.10000000000000006e-102 < a < 2.9000000000000002e-76

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.39999999999999984e-225 < a < 6.59999999999999961e-206 or 7.5999999999999994e-151 < a < 2.19999999999999994e-106

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-74}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-225}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-206}:\\ \;\;\;\;\frac{60}{\frac{z}{x - y}}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-151}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-106}:\\ \;\;\;\;\frac{60}{\frac{z}{x - y}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-102} \lor \neg \left(a \leq 2.9 \cdot 10^{-76}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.8% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-58} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{+30}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -4.00000000000000019e26

    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 0 78.2%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative78.1%

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

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

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

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

    if -4.00000000000000019e26 < (*.f64 a 120) < 9.9999999999999998e-86

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Applied egg-rr79.8%

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

    if 9.9999999999999998e-86 < (*.f64 a 120) < 4.99999999999999977e-58 or 2e30 < (*.f64 a 120)

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

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

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

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

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

    if 4.99999999999999977e-58 < (*.f64 a 120) < 2e30

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

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

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

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

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

Alternative 4: 54.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-77}:\\
\;\;\;\;a \cdot 120\\

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

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

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.4e-77 or 5.19999999999999979e-110 < a

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

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

    if -1.4e-77 < a < -1.30000000000000002e-171

    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 0 57.6%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative57.8%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]
    9. Taylor expanded in y around inf 44.0%

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

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

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

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

    if -1.30000000000000002e-171 < a < -6.7999999999999996e-248

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    12. Simplified49.0%

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

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

    if -6.7999999999999996e-248 < a < -6.79999999999999966e-297 or 9.1999999999999998e-279 < a < 5.19999999999999979e-110

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999966e-297 < a < 9.1999999999999998e-279

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]
    9. Taylor expanded in y around inf 60.8%

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

        \[\leadsto 60 \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      2. un-div-inv60.8%

        \[\leadsto \color{blue}{\frac{60}{\frac{t}{y}}} \]
    11. Applied egg-rr60.8%

      \[\leadsto \color{blue}{\frac{60}{\frac{t}{y}}} \]
    12. Step-by-step derivation
      1. associate-/r/61.1%

        \[\leadsto \color{blue}{\frac{60}{t} \cdot y} \]
    13. Simplified61.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{-77}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-171}:\\ \;\;\;\;\frac{y \cdot 60}{t}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-248}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-297}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-279}:\\ \;\;\;\;y \cdot \frac{60}{t}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-110}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+58} \lor \neg \left(a \cdot 120 \leq 10^{-85}\right) \land \left(a \cdot 120 \leq 2 \cdot 10^{-52} \lor \neg \left(a \cdot 120 \leq 10000000\right)\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -4.99999999999999986e58 or 9.9999999999999998e-86 < (*.f64 a 120) < 2e-52 or 1e7 < (*.f64 a 120)

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

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

    if -4.99999999999999986e58 < (*.f64 a 120) < 9.9999999999999998e-86 or 2e-52 < (*.f64 a 120) < 1e7

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 73.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+26}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-85} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-52}\right) \land a \cdot 120 \leq 10000000:\\ \;\;\;\;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 (<= (* a 120.0) -4e+26)
   (+ (* a 120.0) (* 60.0 (/ y t)))
   (if (or (<= (* a 120.0) 1e-85)
           (and (not (<= (* a 120.0) 2e-52)) (<= (* a 120.0) 10000000.0)))
     (* 60.0 (/ (- x y) (- z t)))
     (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -4e+26) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (((a * 120.0) <= 1e-85) || (!((a * 120.0) <= 2e-52) && ((a * 120.0) <= 10000000.0))) {
		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 ((a * 120.0d0) <= (-4d+26)) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if (((a * 120.0d0) <= 1d-85) .or. (.not. ((a * 120.0d0) <= 2d-52)) .and. ((a * 120.0d0) <= 10000000.0d0)) 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 ((a * 120.0) <= -4e+26) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if (((a * 120.0) <= 1e-85) || (!((a * 120.0) <= 2e-52) && ((a * 120.0) <= 10000000.0))) {
		tmp = 60.0 * ((x - y) / (z - t));
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a * 120.0) <= -4e+26:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif ((a * 120.0) <= 1e-85) or (not ((a * 120.0) <= 2e-52) and ((a * 120.0) <= 10000000.0)):
		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(a * 120.0) <= -4e+26)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif ((Float64(a * 120.0) <= 1e-85) || (!(Float64(a * 120.0) <= 2e-52) && (Float64(a * 120.0) <= 10000000.0)))
		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 ((a * 120.0) <= -4e+26)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif (((a * 120.0) <= 1e-85) || (~(((a * 120.0) <= 2e-52)) && ((a * 120.0) <= 10000000.0)))
		tmp = 60.0 * ((x - y) / (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], -4e+26], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-85], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-52]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 10000000.0]]], 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}\;a \cdot 120 \leq -4 \cdot 10^{+26}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\

\mathbf{elif}\;a \cdot 120 \leq 10^{-85} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-52}\right) \land a \cdot 120 \leq 10000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 120) < -4.00000000000000019e26

    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 0 78.2%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative78.1%

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

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

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

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

    if -4.00000000000000019e26 < (*.f64 a 120) < 9.9999999999999998e-86 or 2e-52 < (*.f64 a 120) < 1e7

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999998e-86 < (*.f64 a 120) < 2e-52 or 1e7 < (*.f64 a 120)

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

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

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

Alternative 7: 73.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+26}:\\ \;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-85}:\\ \;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\ \mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52} \lor \neg \left(a \cdot 120 \leq 10000000\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 (<= (* a 120.0) -4e+26)
   (+ (* a 120.0) (* 60.0 (/ y t)))
   (if (<= (* a 120.0) 1e-85)
     (/ 60.0 (/ (- z t) (- x y)))
     (if (or (<= (* a 120.0) 2e-52) (not (<= (* a 120.0) 10000000.0)))
       (* a 120.0)
       (* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -4e+26) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if ((a * 120.0) <= 1e-85) {
		tmp = 60.0 / ((z - t) / (x - y));
	} else if (((a * 120.0) <= 2e-52) || !((a * 120.0) <= 10000000.0)) {
		tmp = a * 120.0;
	} else {
		tmp = 60.0 * ((x - y) / (z - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a * 120.0d0) <= (-4d+26)) then
        tmp = (a * 120.0d0) + (60.0d0 * (y / t))
    else if ((a * 120.0d0) <= 1d-85) then
        tmp = 60.0d0 / ((z - t) / (x - y))
    else if (((a * 120.0d0) <= 2d-52) .or. (.not. ((a * 120.0d0) <= 10000000.0d0))) then
        tmp = a * 120.0d0
    else
        tmp = 60.0d0 * ((x - y) / (z - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a * 120.0) <= -4e+26) {
		tmp = (a * 120.0) + (60.0 * (y / t));
	} else if ((a * 120.0) <= 1e-85) {
		tmp = 60.0 / ((z - t) / (x - y));
	} else if (((a * 120.0) <= 2e-52) || !((a * 120.0) <= 10000000.0)) {
		tmp = a * 120.0;
	} else {
		tmp = 60.0 * ((x - y) / (z - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a * 120.0) <= -4e+26:
		tmp = (a * 120.0) + (60.0 * (y / t))
	elif (a * 120.0) <= 1e-85:
		tmp = 60.0 / ((z - t) / (x - y))
	elif ((a * 120.0) <= 2e-52) or not ((a * 120.0) <= 10000000.0):
		tmp = a * 120.0
	else:
		tmp = 60.0 * ((x - y) / (z - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(a * 120.0) <= -4e+26)
		tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t)));
	elseif (Float64(a * 120.0) <= 1e-85)
		tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)));
	elseif ((Float64(a * 120.0) <= 2e-52) || !(Float64(a * 120.0) <= 10000000.0))
		tmp = Float64(a * 120.0);
	else
		tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a * 120.0) <= -4e+26)
		tmp = (a * 120.0) + (60.0 * (y / t));
	elseif ((a * 120.0) <= 1e-85)
		tmp = 60.0 / ((z - t) / (x - y));
	elseif (((a * 120.0) <= 2e-52) || ~(((a * 120.0) <= 10000000.0)))
		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[(a * 120.0), $MachinePrecision], -4e+26], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-85], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-52], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-52} \lor \neg \left(a \cdot 120 \leq 10000000\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a 120) < -4.00000000000000019e26

    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 0 78.2%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative78.1%

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

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

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

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

    if -4.00000000000000019e26 < (*.f64 a 120) < 9.9999999999999998e-86

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Applied egg-rr79.8%

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

    if 9.9999999999999998e-86 < (*.f64 a 120) < 2e-52 or 1e7 < (*.f64 a 120)

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

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

    if 2e-52 < (*.f64 a 120) < 1e7

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 58.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{-74}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.5000000000000001e-74 or 2.69999999999999984e-87 < a

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

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

    if -5.5000000000000001e-74 < a < 1.05000000000000003e-224 or 4.6999999999999999e-206 < a < 2.69999999999999984e-87

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative62.5%

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

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

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

    if 1.05000000000000003e-224 < a < 4.6999999999999999e-206

    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.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. Step-by-step derivation
      1. +-commutative99.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{-74}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-224}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-206}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-87}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{-197}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq -1.52 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.45 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.2e-197 or 2.4500000000000002e-149 < a

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

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

    if -2.2e-197 < a < -1.51999999999999992e-264 or 4.3999999999999997e-270 < a < 2.4500000000000002e-149

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    12. Simplified50.5%

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

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

    if -1.51999999999999992e-264 < a < 4.3999999999999997e-270

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    12. Simplified40.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-197}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -1.52 \cdot 10^{-264}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-270}:\\ \;\;\;\;60 \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-149}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 82.1% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 120) < -9.99999999999999943e-68 or 9.9999999999999998e-86 < (*.f64 a 120)

    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 0 87.7%

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

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

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

    if -9.99999999999999943e-68 < (*.f64 a 120) < 9.9999999999999998e-86

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    9. Applied egg-rr85.5%

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

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

Alternative 11: 84.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-58} \lor \neg \left(z \leq 1.9 \cdot 10^{-35}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999997e-58 or 1.9000000000000001e-35 < z

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

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

    if -3.7999999999999997e-58 < z < 1.9000000000000001e-35

    1. Initial program 99.8%

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

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

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

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

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

Alternative 12: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{-56} \lor \neg \left(z \leq 2.7 \cdot 10^{-27}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.55e-56 or 2.69999999999999989e-27 < z

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

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

    if -2.55e-56 < z < 2.69999999999999989e-27

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 13: 84.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{-65} \lor \neg \left(z \leq 5 \cdot 10^{-35}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.04999999999999994e-65 or 4.99999999999999964e-35 < z

    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-num39.8%

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

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

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

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

    if -2.04999999999999994e-65 < z < 4.99999999999999964e-35

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 14: 88.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+64} \lor \neg \left(y \leq 9 \cdot 10^{+88}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.20000000000000027e64 or 9e88 < 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 90.5%

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

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

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

    if -7.20000000000000027e64 < y < 9e88

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

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

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

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

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

Alternative 15: 52.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-197} \lor \neg \left(a \leq 1.45 \cdot 10^{-148}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.15e-197 or 1.4499999999999999e-148 < a

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

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

    if -1.15e-197 < a < 1.4499999999999999e-148

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60 \cdot x}{z - t}} \]
    12. Simplified46.5%

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

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

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

Alternative 16: 99.8% accurate, 1.0× speedup?

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

\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.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 60 \cdot \frac{x - y}{z - t} + a \cdot 120 \]
  6. Add Preprocessing

Alternative 17: 51.6% accurate, 1.3× speedup?

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

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

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


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

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

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

    if 3.6000000000000002e217 < y

    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 0 71.3%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative71.3%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]
    9. Taylor expanded in y around inf 46.1%

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

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

Alternative 18: 51.6% accurate, 1.3× speedup?

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

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

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


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

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

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

    if 6.99999999999999954e215 < y

    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 0 71.3%

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

        \[\leadsto \color{blue}{\frac{-60 \cdot \left(x - y\right)}{t}} + a \cdot 120 \]
      2. *-commutative71.3%

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

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

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

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} + a \cdot 120 \]
    9. Taylor expanded in y around inf 46.1%

      \[\leadsto \color{blue}{60 \cdot \frac{y}{t}} \]
    10. Step-by-step derivation
      1. clear-num46.1%

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

        \[\leadsto \color{blue}{\frac{60}{\frac{t}{y}}} \]
    11. Applied egg-rr46.2%

      \[\leadsto \color{blue}{\frac{60}{\frac{t}{y}}} \]
    12. Step-by-step derivation
      1. associate-/r/46.2%

        \[\leadsto \color{blue}{\frac{60}{t} \cdot y} \]
    13. Simplified46.2%

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

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

Alternative 19: 50.3% accurate, 4.3× speedup?

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

\\
a \cdot 120
\end{array}
Derivation
  1. Initial program 99.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 51.2%

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

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

Developer target: 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 2024053 
(FPCore (x y z t a)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
  :precision binary64

  :alt
  (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))

  (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))