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

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

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 73.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z - t}\\ \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+93}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-27}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-21}:\\ \;\;\;\;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 t)))))
   (if (<= (* a 120.0) -2e+93)
     (* a 120.0)
     (if (<= (* a 120.0) -5e+43)
       t_1
       (if (<= (* a 120.0) -5e-27)
         (+ (* a 120.0) (* -60.0 (/ x t)))
         (if (<= (* a 120.0) 1e-21) 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 - t));
	double tmp;
	if ((a * 120.0) <= -2e+93) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -5e+43) {
		tmp = t_1;
	} else if ((a * 120.0) <= -5e-27) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1e-21) {
		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 - t))
    if ((a * 120.0d0) <= (-2d+93)) then
        tmp = a * 120.0d0
    else if ((a * 120.0d0) <= (-5d+43)) then
        tmp = t_1
    else if ((a * 120.0d0) <= (-5d-27)) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    else if ((a * 120.0d0) <= 1d-21) 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 - t));
	double tmp;
	if ((a * 120.0) <= -2e+93) {
		tmp = a * 120.0;
	} else if ((a * 120.0) <= -5e+43) {
		tmp = t_1;
	} else if ((a * 120.0) <= -5e-27) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1e-21) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = 60.0 * ((x - y) / (z - t))
	tmp = 0
	if (a * 120.0) <= -2e+93:
		tmp = a * 120.0
	elif (a * 120.0) <= -5e+43:
		tmp = t_1
	elif (a * 120.0) <= -5e-27:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	elif (a * 120.0) <= 1e-21:
		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) / Float64(z - t)))
	tmp = 0.0
	if (Float64(a * 120.0) <= -2e+93)
		tmp = Float64(a * 120.0);
	elseif (Float64(a * 120.0) <= -5e+43)
		tmp = t_1;
	elseif (Float64(a * 120.0) <= -5e-27)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	elseif (Float64(a * 120.0) <= 1e-21)
		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 - t));
	tmp = 0.0;
	if ((a * 120.0) <= -2e+93)
		tmp = a * 120.0;
	elseif ((a * 120.0) <= -5e+43)
		tmp = t_1;
	elseif ((a * 120.0) <= -5e-27)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	elseif ((a * 120.0) <= 1e-21)
		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] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+93], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+43], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-21], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \cdot 120 \leq 10^{-21}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 99.1%

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

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

    if -2.00000000000000009e93 < (*.f64 a #s(literal 120 binary64)) < -5.0000000000000004e43 or -5.0000000000000002e-27 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999908e-22

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

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

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

    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. Taylor expanded in z around 0 91.9%

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

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

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

Alternative 3: 58.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z}\\ \mathbf{if}\;a \leq -1.05 \cdot 10^{-31}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-134}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-273}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-94}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \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.05e-31)
     (* a 120.0)
     (if (<= a -2.45e-76)
       t_1
       (if (<= a -1.65e-134)
         (* a 120.0)
         (if (<= a 1.02e-273)
           t_1
           (if (<= a 9e-94) (* -60.0 (/ (- x y) t)) (* 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.05e-31) {
		tmp = a * 120.0;
	} else if (a <= -2.45e-76) {
		tmp = t_1;
	} else if (a <= -1.65e-134) {
		tmp = a * 120.0;
	} else if (a <= 1.02e-273) {
		tmp = t_1;
	} else if (a <= 9e-94) {
		tmp = -60.0 * ((x - y) / 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) :: t_1
    real(8) :: tmp
    t_1 = 60.0d0 * ((x - y) / z)
    if (a <= (-1.05d-31)) then
        tmp = a * 120.0d0
    else if (a <= (-2.45d-76)) then
        tmp = t_1
    else if (a <= (-1.65d-134)) then
        tmp = a * 120.0d0
    else if (a <= 1.02d-273) then
        tmp = t_1
    else if (a <= 9d-94) then
        tmp = (-60.0d0) * ((x - y) / 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 t_1 = 60.0 * ((x - y) / z);
	double tmp;
	if (a <= -1.05e-31) {
		tmp = a * 120.0;
	} else if (a <= -2.45e-76) {
		tmp = t_1;
	} else if (a <= -1.65e-134) {
		tmp = a * 120.0;
	} else if (a <= 1.02e-273) {
		tmp = t_1;
	} else if (a <= 9e-94) {
		tmp = -60.0 * ((x - y) / t);
	} 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.05e-31:
		tmp = a * 120.0
	elif a <= -2.45e-76:
		tmp = t_1
	elif a <= -1.65e-134:
		tmp = a * 120.0
	elif a <= 1.02e-273:
		tmp = t_1
	elif a <= 9e-94:
		tmp = -60.0 * ((x - y) / t)
	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.05e-31)
		tmp = Float64(a * 120.0);
	elseif (a <= -2.45e-76)
		tmp = t_1;
	elseif (a <= -1.65e-134)
		tmp = Float64(a * 120.0);
	elseif (a <= 1.02e-273)
		tmp = t_1;
	elseif (a <= 9e-94)
		tmp = Float64(-60.0 * Float64(Float64(x - y) / t));
	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.05e-31)
		tmp = a * 120.0;
	elseif (a <= -2.45e-76)
		tmp = t_1;
	elseif (a <= -1.65e-134)
		tmp = a * 120.0;
	elseif (a <= 1.02e-273)
		tmp = t_1;
	elseif (a <= 9e-94)
		tmp = -60.0 * ((x - y) / t);
	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.05e-31], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.45e-76], t$95$1, If[LessEqual[a, -1.65e-134], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.02e-273], t$95$1, If[LessEqual[a, 9e-94], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-134}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.04999999999999996e-31 or -2.44999999999999986e-76 < a < -1.6500000000000001e-134 or 9.0000000000000004e-94 < a

    1. Initial program 99.3%

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

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

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

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

    if -1.04999999999999996e-31 < a < -2.44999999999999986e-76 or -1.6500000000000001e-134 < a < 1.0200000000000001e-273

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

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

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

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

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

    if 1.0200000000000001e-273 < a < 9.0000000000000004e-94

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-31}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-76}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-134}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-273}:\\ \;\;\;\;60 \cdot \frac{x - y}{z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-94}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 54.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{y}{z - t}\\ \mathbf{if}\;a \leq -7.5 \cdot 10^{-41}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-220}:\\ \;\;\;\;\frac{x \cdot -60}{t}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-305}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -60.0 (/ y (- z t)))))
   (if (<= a -7.5e-41)
     (* a 120.0)
     (if (<= a -3.3e-220)
       (/ (* x -60.0) t)
       (if (<= a -1.9e-274)
         t_1
         (if (<= a -1.3e-305)
           (* x (/ 60.0 z))
           (if (<= a 3e-39) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * (y / (z - t));
	double tmp;
	if (a <= -7.5e-41) {
		tmp = a * 120.0;
	} else if (a <= -3.3e-220) {
		tmp = (x * -60.0) / t;
	} else if (a <= -1.9e-274) {
		tmp = t_1;
	} else if (a <= -1.3e-305) {
		tmp = x * (60.0 / z);
	} else if (a <= 3e-39) {
		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) * (y / (z - t))
    if (a <= (-7.5d-41)) then
        tmp = a * 120.0d0
    else if (a <= (-3.3d-220)) then
        tmp = (x * (-60.0d0)) / t
    else if (a <= (-1.9d-274)) then
        tmp = t_1
    else if (a <= (-1.3d-305)) then
        tmp = x * (60.0d0 / z)
    else if (a <= 3d-39) 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 * (y / (z - t));
	double tmp;
	if (a <= -7.5e-41) {
		tmp = a * 120.0;
	} else if (a <= -3.3e-220) {
		tmp = (x * -60.0) / t;
	} else if (a <= -1.9e-274) {
		tmp = t_1;
	} else if (a <= -1.3e-305) {
		tmp = x * (60.0 / z);
	} else if (a <= 3e-39) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * (y / (z - t))
	tmp = 0
	if a <= -7.5e-41:
		tmp = a * 120.0
	elif a <= -3.3e-220:
		tmp = (x * -60.0) / t
	elif a <= -1.9e-274:
		tmp = t_1
	elif a <= -1.3e-305:
		tmp = x * (60.0 / z)
	elif a <= 3e-39:
		tmp = t_1
	else:
		tmp = a * 120.0
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(-60.0 * Float64(y / Float64(z - t)))
	tmp = 0.0
	if (a <= -7.5e-41)
		tmp = Float64(a * 120.0);
	elseif (a <= -3.3e-220)
		tmp = Float64(Float64(x * -60.0) / t);
	elseif (a <= -1.9e-274)
		tmp = t_1;
	elseif (a <= -1.3e-305)
		tmp = Float64(x * Float64(60.0 / z));
	elseif (a <= 3e-39)
		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 * (y / (z - t));
	tmp = 0.0;
	if (a <= -7.5e-41)
		tmp = a * 120.0;
	elseif (a <= -3.3e-220)
		tmp = (x * -60.0) / t;
	elseif (a <= -1.9e-274)
		tmp = t_1;
	elseif (a <= -1.3e-305)
		tmp = x * (60.0 / z);
	elseif (a <= 3e-39)
		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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.5e-41], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.3e-220], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, -1.9e-274], t$95$1, If[LessEqual[a, -1.3e-305], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-39], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -7.5 \cdot 10^{-41}:\\
\;\;\;\;a \cdot 120\\

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.50000000000000049e-41 or 3.00000000000000028e-39 < a

    1. Initial program 99.2%

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

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

    if -7.50000000000000049e-41 < a < -3.29999999999999999e-220

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot x}{t}} \]
    11. Simplified45.1%

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

    if -3.29999999999999999e-220 < a < -1.89999999999999992e-274 or -1.3000000000000001e-305 < a < 3.00000000000000028e-39

    1. Initial program 99.7%

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

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

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

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

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

    if -1.89999999999999992e-274 < a < -1.3000000000000001e-305

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-41}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-220}:\\ \;\;\;\;\frac{x \cdot -60}{t}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-274}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-305}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-39}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 72.7% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr80.2%

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

    if 1.00000000000000006e-9 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

Alternative 6: 72.7% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000006e-9 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

Alternative 7: 73.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+47}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\ \mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-27}:\\ \;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\ \mathbf{elif}\;a \cdot 120 \leq 10^{-21}:\\ \;\;\;\;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) -2e+47)
   (+ (* a 120.0) (* -60.0 (/ y z)))
   (if (<= (* a 120.0) -5e-27)
     (+ (* a 120.0) (* -60.0 (/ x t)))
     (if (<= (* a 120.0) 1e-21) (* 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) <= -2e+47) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else if ((a * 120.0) <= -5e-27) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1e-21) {
		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) <= (-2d+47)) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
    else if ((a * 120.0d0) <= (-5d-27)) then
        tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
    else if ((a * 120.0d0) <= 1d-21) 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) <= -2e+47) {
		tmp = (a * 120.0) + (-60.0 * (y / z));
	} else if ((a * 120.0) <= -5e-27) {
		tmp = (a * 120.0) + (-60.0 * (x / t));
	} else if ((a * 120.0) <= 1e-21) {
		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) <= -2e+47:
		tmp = (a * 120.0) + (-60.0 * (y / z))
	elif (a * 120.0) <= -5e-27:
		tmp = (a * 120.0) + (-60.0 * (x / t))
	elif (a * 120.0) <= 1e-21:
		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) <= -2e+47)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z)));
	elseif (Float64(a * 120.0) <= -5e-27)
		tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t)));
	elseif (Float64(a * 120.0) <= 1e-21)
		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) <= -2e+47)
		tmp = (a * 120.0) + (-60.0 * (y / z));
	elseif ((a * 120.0) <= -5e-27)
		tmp = (a * 120.0) + (-60.0 * (x / t));
	elseif ((a * 120.0) <= 1e-21)
		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], -2e+47], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-21], 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 -2 \cdot 10^{+47}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\

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

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

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999908e-22 < (*.f64 a #s(literal 120 binary64))

    1. Initial program 100.0%

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

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

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

Alternative 8: 73.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+89} \lor \neg \left(a \leq -3.6 \cdot 10^{+16} \lor \neg \left(a \leq -8.5 \cdot 10^{-31}\right) \land a \leq 1.4 \cdot 10^{-20}\right):\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.19999999999999972e89 or -3.6e16 < a < -8.5000000000000007e-31 or 1.4000000000000001e-20 < a

    1. Initial program 99.1%

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

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

    if -4.19999999999999972e89 < a < -3.6e16 or -8.5000000000000007e-31 < a < 1.4000000000000001e-20

    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. Taylor expanded in a around 0 79.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+89} \lor \neg \left(a \leq -3.6 \cdot 10^{+16} \lor \neg \left(a \leq -8.5 \cdot 10^{-31}\right) \land a \leq 1.4 \cdot 10^{-20}\right):\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;60 \cdot \frac{x - y}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 55.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{60}{z - t}\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.1 \cdot 10^{-263}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 4.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.3999999999999999e102 or 2.1e114 < x

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

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

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

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

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

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

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

    if -6.3999999999999999e102 < x < 1.1e-263 or 4.59999999999999956e-171 < x < 2.1e114

    1. Initial program 99.2%

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

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

    if 1.1e-263 < x < 4.59999999999999956e-171

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+102}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-263}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-171}:\\ \;\;\;\;\frac{y \cdot -60}{z - t}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{60}{z - t}\\
\mathbf{if}\;x \leq -1.46 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 8.5 \cdot 10^{-264}:\\
\;\;\;\;a \cdot 120\\

\mathbf{elif}\;x \leq 1.15 \cdot 10^{-179}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\
\;\;\;\;a \cdot 120\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.45999999999999998e103 or 2.1e114 < x

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

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

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

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

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

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

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

    if -1.45999999999999998e103 < x < 8.5000000000000001e-264 or 1.14999999999999994e-179 < x < 2.1e114

    1. Initial program 99.2%

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

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

    if 8.5000000000000001e-264 < x < 1.14999999999999994e-179

    1. Initial program 99.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.46 \cdot 10^{+103}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-264}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-179}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\ \;\;\;\;a \cdot 120\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{60}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 56.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -60 \cdot \frac{x - y}{t}\\ \mathbf{if}\;a \leq -4.6 \cdot 10^{-38}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-292}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-93}:\\ \;\;\;\;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) t))))
   (if (<= a -4.6e-38)
     (* a 120.0)
     (if (<= a -9.6e-274)
       t_1
       (if (<= a 1.95e-292)
         (* x (/ 60.0 z))
         (if (<= a 1.55e-93) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -60.0 * ((x - y) / t);
	double tmp;
	if (a <= -4.6e-38) {
		tmp = a * 120.0;
	} else if (a <= -9.6e-274) {
		tmp = t_1;
	} else if (a <= 1.95e-292) {
		tmp = x * (60.0 / z);
	} else if (a <= 1.55e-93) {
		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) / t)
    if (a <= (-4.6d-38)) then
        tmp = a * 120.0d0
    else if (a <= (-9.6d-274)) then
        tmp = t_1
    else if (a <= 1.95d-292) then
        tmp = x * (60.0d0 / z)
    else if (a <= 1.55d-93) 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) / t);
	double tmp;
	if (a <= -4.6e-38) {
		tmp = a * 120.0;
	} else if (a <= -9.6e-274) {
		tmp = t_1;
	} else if (a <= 1.95e-292) {
		tmp = x * (60.0 / z);
	} else if (a <= 1.55e-93) {
		tmp = t_1;
	} else {
		tmp = a * 120.0;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -60.0 * ((x - y) / t)
	tmp = 0
	if a <= -4.6e-38:
		tmp = a * 120.0
	elif a <= -9.6e-274:
		tmp = t_1
	elif a <= 1.95e-292:
		tmp = x * (60.0 / z)
	elif a <= 1.55e-93:
		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) / t))
	tmp = 0.0
	if (a <= -4.6e-38)
		tmp = Float64(a * 120.0);
	elseif (a <= -9.6e-274)
		tmp = t_1;
	elseif (a <= 1.95e-292)
		tmp = Float64(x * Float64(60.0 / z));
	elseif (a <= 1.55e-93)
		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) / t);
	tmp = 0.0;
	if (a <= -4.6e-38)
		tmp = a * 120.0;
	elseif (a <= -9.6e-274)
		tmp = t_1;
	elseif (a <= 1.95e-292)
		tmp = x * (60.0 / z);
	elseif (a <= 1.55e-93)
		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] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.6e-38], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.6e-274], t$95$1, If[LessEqual[a, 1.95e-292], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-93], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.60000000000000003e-38 or 1.55e-93 < a

    1. Initial program 99.2%

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

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

    if -4.60000000000000003e-38 < a < -9.600000000000001e-274 or 1.95e-292 < a < 1.55e-93

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

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

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

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

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

    if -9.600000000000001e-274 < a < 1.95e-292

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{-38}:\\ \;\;\;\;a \cdot 120\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-274}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-292}:\\ \;\;\;\;x \cdot \frac{60}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-93}:\\ \;\;\;\;-60 \cdot \frac{x - y}{t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot 120\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 89.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.3000000000000001e97 or 2.3e-6 < y

    1. Initial program 98.9%

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

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

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

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

    if -3.3000000000000001e97 < y < 2.3e-6

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

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

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

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

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

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

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

Alternative 13: 84.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{-21} \lor \neg \left(z \leq 3 \cdot 10^{-46}\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 -6.6e-21) (not (<= z 3e-46)))
   (+ (* 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 <= -6.6e-21) || !(z <= 3e-46)) {
		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 <= (-6.6d-21)) .or. (.not. (z <= 3d-46))) 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 <= -6.6e-21) || !(z <= 3e-46)) {
		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 <= -6.6e-21) or not (z <= 3e-46):
		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 <= -6.6e-21) || !(z <= 3e-46))
		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 <= -6.6e-21) || ~((z <= 3e-46)))
		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, -6.6e-21], N[Not[LessEqual[z, 3e-46]], $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 -6.6 \cdot 10^{-21} \lor \neg \left(z \leq 3 \cdot 10^{-46}\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 < -6.60000000000000018e-21 or 2.99999999999999987e-46 < z

    1. Initial program 99.1%

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

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

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

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

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

    if -6.60000000000000018e-21 < z < 2.99999999999999987e-46

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{-21} \lor \neg \left(z \leq 3 \cdot 10^{-46}\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 14: 82.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+103} \lor \neg \left(x \leq 2.1 \cdot 10^{+114}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.4499999999999999e103 or 2.1e114 < x

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

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

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

        \[\leadsto \color{blue}{\frac{60}{\frac{z - t}{x - y}}} \]
    7. Applied egg-rr77.0%

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

    if -1.4499999999999999e103 < x < 2.1e114

    1. Initial program 99.2%

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

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

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

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

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

Alternative 15: 89.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

    if -9.2000000000000006e96 < y < 2.3999999999999999e-6

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

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

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

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

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

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

    if 2.3999999999999999e-6 < y

    1. Initial program 98.1%

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

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

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

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

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

Alternative 16: 51.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\
\;\;\;\;a \cdot 120\\

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


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

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

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

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

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

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

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

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

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

    if -7.00000000000000045e182 < x < 2.1e114

    1. Initial program 99.3%

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

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

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

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

    if 2.1e114 < x

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-60 \cdot x}{t}} \]
    11. Simplified50.0%

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

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

Alternative 17: 51.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\
\;\;\;\;a \cdot 120\\

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


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

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

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

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

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

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

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

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

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

    if -3.1500000000000001e181 < x < 2.1e114

    1. Initial program 99.3%

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

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

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

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

    if 2.1e114 < x

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

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

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

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

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

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

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

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

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

Alternative 18: 51.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+114}:\\
\;\;\;\;a \cdot 120\\

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


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

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

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

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

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

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

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

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

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

    if -8.49999999999999962e179 < x < 2.1e114

    1. Initial program 99.3%

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

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

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

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

    if 2.1e114 < x

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

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

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

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

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

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

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

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

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

Alternative 19: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 20: 50.1% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

    if 2.1e114 < x

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

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

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

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

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

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

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

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

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

Alternative 21: 50.4% accurate, 4.3× speedup?

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

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

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

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

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

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

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