Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.6% → 96.7%
Time: 10.7s
Alternatives: 19
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b):
	return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 92.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b):
	return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}

Alternative 1: 96.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 4.2 \cdot 10^{+30}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z 4.2e+30)
   (+ (fma y z x) (* a (+ t (* z b))))
   (* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= 4.2e+30) {
		tmp = fma(y, z, x) + (a * (t + (z * b)));
	} else {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= 4.2e+30)
		tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b))));
	else
		tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.2e+30], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.2 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.2e30

    1. Initial program 94.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+94.8%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative94.8%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define94.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*96.3%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative96.3%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative96.3%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg98.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing

    if 4.2e30 < z

    1. Initial program 92.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+92.0%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*84.4%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified84.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 96.6%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative96.6%

        \[\leadsto z \cdot \left(y + \left(a \cdot b + \color{blue}{\left(\frac{a \cdot t}{z} + \frac{x}{z}\right)}\right)\right) \]
      2. associate-+r+96.6%

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

        \[\leadsto z \cdot \left(y + \left(\left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right) + \frac{x}{z}\right)\right) \]
      4. distribute-lft-out99.8%

        \[\leadsto z \cdot \left(y + \left(\color{blue}{a \cdot \left(b + \frac{t}{z}\right)} + \frac{x}{z}\right)\right) \]
    7. Simplified99.8%

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

Alternative 2: 40.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(z \cdot b\right)\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{+26}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-161}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-195}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-304}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-241}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-171}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+109}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* z b))))
   (if (<= t -3.8e+26)
     (* a t)
     (if (<= t -2e-134)
       t_1
       (if (<= t -5.2e-161)
         (* z y)
         (if (<= t -3.3e-195)
           (* z (* a b))
           (if (<= t -1.9e-304)
             x
             (if (<= t 3.2e-241)
               t_1
               (if (<= t 5.5e-171)
                 x
                 (if (<= t 7.6e+109) (* z y) (* a t)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (t <= -3.8e+26) {
		tmp = a * t;
	} else if (t <= -2e-134) {
		tmp = t_1;
	} else if (t <= -5.2e-161) {
		tmp = z * y;
	} else if (t <= -3.3e-195) {
		tmp = z * (a * b);
	} else if (t <= -1.9e-304) {
		tmp = x;
	} else if (t <= 3.2e-241) {
		tmp = t_1;
	} else if (t <= 5.5e-171) {
		tmp = x;
	} else if (t <= 7.6e+109) {
		tmp = z * y;
	} else {
		tmp = a * t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (z * b)
    if (t <= (-3.8d+26)) then
        tmp = a * t
    else if (t <= (-2d-134)) then
        tmp = t_1
    else if (t <= (-5.2d-161)) then
        tmp = z * y
    else if (t <= (-3.3d-195)) then
        tmp = z * (a * b)
    else if (t <= (-1.9d-304)) then
        tmp = x
    else if (t <= 3.2d-241) then
        tmp = t_1
    else if (t <= 5.5d-171) then
        tmp = x
    else if (t <= 7.6d+109) then
        tmp = z * y
    else
        tmp = a * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (t <= -3.8e+26) {
		tmp = a * t;
	} else if (t <= -2e-134) {
		tmp = t_1;
	} else if (t <= -5.2e-161) {
		tmp = z * y;
	} else if (t <= -3.3e-195) {
		tmp = z * (a * b);
	} else if (t <= -1.9e-304) {
		tmp = x;
	} else if (t <= 3.2e-241) {
		tmp = t_1;
	} else if (t <= 5.5e-171) {
		tmp = x;
	} else if (t <= 7.6e+109) {
		tmp = z * y;
	} else {
		tmp = a * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (z * b)
	tmp = 0
	if t <= -3.8e+26:
		tmp = a * t
	elif t <= -2e-134:
		tmp = t_1
	elif t <= -5.2e-161:
		tmp = z * y
	elif t <= -3.3e-195:
		tmp = z * (a * b)
	elif t <= -1.9e-304:
		tmp = x
	elif t <= 3.2e-241:
		tmp = t_1
	elif t <= 5.5e-171:
		tmp = x
	elif t <= 7.6e+109:
		tmp = z * y
	else:
		tmp = a * t
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(z * b))
	tmp = 0.0
	if (t <= -3.8e+26)
		tmp = Float64(a * t);
	elseif (t <= -2e-134)
		tmp = t_1;
	elseif (t <= -5.2e-161)
		tmp = Float64(z * y);
	elseif (t <= -3.3e-195)
		tmp = Float64(z * Float64(a * b));
	elseif (t <= -1.9e-304)
		tmp = x;
	elseif (t <= 3.2e-241)
		tmp = t_1;
	elseif (t <= 5.5e-171)
		tmp = x;
	elseif (t <= 7.6e+109)
		tmp = Float64(z * y);
	else
		tmp = Float64(a * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (z * b);
	tmp = 0.0;
	if (t <= -3.8e+26)
		tmp = a * t;
	elseif (t <= -2e-134)
		tmp = t_1;
	elseif (t <= -5.2e-161)
		tmp = z * y;
	elseif (t <= -3.3e-195)
		tmp = z * (a * b);
	elseif (t <= -1.9e-304)
		tmp = x;
	elseif (t <= 3.2e-241)
		tmp = t_1;
	elseif (t <= 5.5e-171)
		tmp = x;
	elseif (t <= 7.6e+109)
		tmp = z * y;
	else
		tmp = a * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+26], N[(a * t), $MachinePrecision], If[LessEqual[t, -2e-134], t$95$1, If[LessEqual[t, -5.2e-161], N[(z * y), $MachinePrecision], If[LessEqual[t, -3.3e-195], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.9e-304], x, If[LessEqual[t, 3.2e-241], t$95$1, If[LessEqual[t, 5.5e-171], x, If[LessEqual[t, 7.6e+109], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+26}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;t \leq -2 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -5.2 \cdot 10^{-161}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-195}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-304}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-241}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-171}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 7.6 \cdot 10^{+109}:\\
\;\;\;\;z \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.8000000000000002e26 or 7.60000000000000078e109 < t

    1. Initial program 91.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative91.3%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define91.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*91.4%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative91.4%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative91.4%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified98.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 89.0%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 89.0%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*89.0%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified89.0%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around inf 64.9%

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

    if -3.8000000000000002e26 < t < -2.00000000000000008e-134 or -1.8999999999999998e-304 < t < 3.2e-241

    1. Initial program 97.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative97.3%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define97.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg94.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified94.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 72.3%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 57.6%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*60.1%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified60.1%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in b around inf 52.3%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]

    if -2.00000000000000008e-134 < t < -5.19999999999999991e-161 or 5.50000000000000037e-171 < t < 7.60000000000000078e109

    1. Initial program 93.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+93.4%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*91.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 47.8%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative47.8%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified47.8%

      \[\leadsto \color{blue}{z \cdot y} \]

    if -5.19999999999999991e-161 < t < -3.3e-195

    1. Initial program 99.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+99.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.9%

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    6. Step-by-step derivation
      1. +-commutative66.9%

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
    7. Simplified66.9%

      \[\leadsto \color{blue}{z \cdot \left(a \cdot b + y\right)} \]
    8. Taylor expanded in a around inf 66.9%

      \[\leadsto z \cdot \color{blue}{\left(a \cdot b\right)} \]
    9. Step-by-step derivation
      1. *-commutative66.9%

        \[\leadsto z \cdot \color{blue}{\left(b \cdot a\right)} \]
    10. Simplified66.9%

      \[\leadsto z \cdot \color{blue}{\left(b \cdot a\right)} \]

    if -3.3e-195 < t < -1.8999999999999998e-304 or 3.2e-241 < t < 5.50000000000000037e-171

    1. Initial program 97.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.6%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.6%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 53.8%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+26}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-134}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-161}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-195}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-304}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-241}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-171}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+109}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 40.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(z \cdot b\right)\\ \mathbf{if}\;t \leq -3 \cdot 10^{+24}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-160}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-195}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{-307}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-242}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-167}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+110}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* z b))))
   (if (<= t -3e+24)
     (* a t)
     (if (<= t -9.6e-129)
       t_1
       (if (<= t -1.25e-160)
         (* z y)
         (if (<= t -5e-195)
           t_1
           (if (<= t -6.2e-307)
             x
             (if (<= t 8.5e-242)
               t_1
               (if (<= t 3.9e-167)
                 x
                 (if (<= t 2.25e+110) (* z y) (* a t)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (t <= -3e+24) {
		tmp = a * t;
	} else if (t <= -9.6e-129) {
		tmp = t_1;
	} else if (t <= -1.25e-160) {
		tmp = z * y;
	} else if (t <= -5e-195) {
		tmp = t_1;
	} else if (t <= -6.2e-307) {
		tmp = x;
	} else if (t <= 8.5e-242) {
		tmp = t_1;
	} else if (t <= 3.9e-167) {
		tmp = x;
	} else if (t <= 2.25e+110) {
		tmp = z * y;
	} else {
		tmp = a * t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (z * b)
    if (t <= (-3d+24)) then
        tmp = a * t
    else if (t <= (-9.6d-129)) then
        tmp = t_1
    else if (t <= (-1.25d-160)) then
        tmp = z * y
    else if (t <= (-5d-195)) then
        tmp = t_1
    else if (t <= (-6.2d-307)) then
        tmp = x
    else if (t <= 8.5d-242) then
        tmp = t_1
    else if (t <= 3.9d-167) then
        tmp = x
    else if (t <= 2.25d+110) then
        tmp = z * y
    else
        tmp = a * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (t <= -3e+24) {
		tmp = a * t;
	} else if (t <= -9.6e-129) {
		tmp = t_1;
	} else if (t <= -1.25e-160) {
		tmp = z * y;
	} else if (t <= -5e-195) {
		tmp = t_1;
	} else if (t <= -6.2e-307) {
		tmp = x;
	} else if (t <= 8.5e-242) {
		tmp = t_1;
	} else if (t <= 3.9e-167) {
		tmp = x;
	} else if (t <= 2.25e+110) {
		tmp = z * y;
	} else {
		tmp = a * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (z * b)
	tmp = 0
	if t <= -3e+24:
		tmp = a * t
	elif t <= -9.6e-129:
		tmp = t_1
	elif t <= -1.25e-160:
		tmp = z * y
	elif t <= -5e-195:
		tmp = t_1
	elif t <= -6.2e-307:
		tmp = x
	elif t <= 8.5e-242:
		tmp = t_1
	elif t <= 3.9e-167:
		tmp = x
	elif t <= 2.25e+110:
		tmp = z * y
	else:
		tmp = a * t
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(z * b))
	tmp = 0.0
	if (t <= -3e+24)
		tmp = Float64(a * t);
	elseif (t <= -9.6e-129)
		tmp = t_1;
	elseif (t <= -1.25e-160)
		tmp = Float64(z * y);
	elseif (t <= -5e-195)
		tmp = t_1;
	elseif (t <= -6.2e-307)
		tmp = x;
	elseif (t <= 8.5e-242)
		tmp = t_1;
	elseif (t <= 3.9e-167)
		tmp = x;
	elseif (t <= 2.25e+110)
		tmp = Float64(z * y);
	else
		tmp = Float64(a * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (z * b);
	tmp = 0.0;
	if (t <= -3e+24)
		tmp = a * t;
	elseif (t <= -9.6e-129)
		tmp = t_1;
	elseif (t <= -1.25e-160)
		tmp = z * y;
	elseif (t <= -5e-195)
		tmp = t_1;
	elseif (t <= -6.2e-307)
		tmp = x;
	elseif (t <= 8.5e-242)
		tmp = t_1;
	elseif (t <= 3.9e-167)
		tmp = x;
	elseif (t <= 2.25e+110)
		tmp = z * y;
	else
		tmp = a * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+24], N[(a * t), $MachinePrecision], If[LessEqual[t, -9.6e-129], t$95$1, If[LessEqual[t, -1.25e-160], N[(z * y), $MachinePrecision], If[LessEqual[t, -5e-195], t$95$1, If[LessEqual[t, -6.2e-307], x, If[LessEqual[t, 8.5e-242], t$95$1, If[LessEqual[t, 3.9e-167], x, If[LessEqual[t, 2.25e+110], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{+24}:\\
\;\;\;\;a \cdot t\\

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-160}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;t \leq -5 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -6.2 \cdot 10^{-307}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-167}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+110}:\\
\;\;\;\;z \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.99999999999999995e24 or 2.2500000000000001e110 < t

    1. Initial program 91.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative91.3%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define91.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*91.4%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative91.4%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative91.4%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified98.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 89.0%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 89.0%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*89.0%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified89.0%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around inf 64.9%

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

    if -2.99999999999999995e24 < t < -9.59999999999999954e-129 or -1.24999999999999999e-160 < t < -5.00000000000000009e-195 or -6.1999999999999996e-307 < t < 8.4999999999999997e-242

    1. Initial program 97.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.9%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative97.9%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define97.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*96.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative96.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative96.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg96.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified96.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 77.6%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 59.8%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*59.8%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified59.8%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in b around inf 55.7%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]

    if -9.59999999999999954e-129 < t < -1.24999999999999999e-160 or 3.89999999999999984e-167 < t < 2.2500000000000001e110

    1. Initial program 93.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+93.4%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*91.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 47.8%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative47.8%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified47.8%

      \[\leadsto \color{blue}{z \cdot y} \]

    if -5.00000000000000009e-195 < t < -6.1999999999999996e-307 or 8.4999999999999997e-242 < t < 3.89999999999999984e-167

    1. Initial program 97.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.6%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.6%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 53.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+24}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-129}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-160}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-195}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{-307}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-242}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-167}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+110}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 98.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(z \cdot a\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ (+ x (* z y)) (* a t)) (* b (* z a)))))
   (if (<= t_1 INFINITY) t_1 (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x + Float64(z * y)) + Float64(a * t)) + Float64(b * Float64(z * a)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0

    1. Initial program 98.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing

    if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b))

    1. Initial program 0.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+0.0%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*25.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified25.0%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 58.3%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative58.3%

        \[\leadsto z \cdot \left(y + \left(a \cdot b + \color{blue}{\left(\frac{a \cdot t}{z} + \frac{x}{z}\right)}\right)\right) \]
      2. associate-+r+58.3%

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

        \[\leadsto z \cdot \left(y + \left(\left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right) + \frac{x}{z}\right)\right) \]
      4. distribute-lft-out100.0%

        \[\leadsto z \cdot \left(y + \left(\color{blue}{a \cdot \left(b + \frac{t}{z}\right)} + \frac{x}{z}\right)\right) \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(z \cdot a\right) \leq \infty:\\ \;\;\;\;\left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(z \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 38.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -470000000000:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-175}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.15 \cdot 10^{-239}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-171}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+109}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -470000000000.0)
   (* a t)
   (if (<= t -9.8e-175)
     (* z y)
     (if (<= t -3.8e-265)
       x
       (if (<= t 3.15e-239)
         (* z y)
         (if (<= t 3e-171) x (if (<= t 8.5e+109) (* z y) (* a t))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -470000000000.0) {
		tmp = a * t;
	} else if (t <= -9.8e-175) {
		tmp = z * y;
	} else if (t <= -3.8e-265) {
		tmp = x;
	} else if (t <= 3.15e-239) {
		tmp = z * y;
	} else if (t <= 3e-171) {
		tmp = x;
	} else if (t <= 8.5e+109) {
		tmp = z * y;
	} else {
		tmp = a * t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (t <= (-470000000000.0d0)) then
        tmp = a * t
    else if (t <= (-9.8d-175)) then
        tmp = z * y
    else if (t <= (-3.8d-265)) then
        tmp = x
    else if (t <= 3.15d-239) then
        tmp = z * y
    else if (t <= 3d-171) then
        tmp = x
    else if (t <= 8.5d+109) then
        tmp = z * y
    else
        tmp = a * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -470000000000.0) {
		tmp = a * t;
	} else if (t <= -9.8e-175) {
		tmp = z * y;
	} else if (t <= -3.8e-265) {
		tmp = x;
	} else if (t <= 3.15e-239) {
		tmp = z * y;
	} else if (t <= 3e-171) {
		tmp = x;
	} else if (t <= 8.5e+109) {
		tmp = z * y;
	} else {
		tmp = a * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -470000000000.0:
		tmp = a * t
	elif t <= -9.8e-175:
		tmp = z * y
	elif t <= -3.8e-265:
		tmp = x
	elif t <= 3.15e-239:
		tmp = z * y
	elif t <= 3e-171:
		tmp = x
	elif t <= 8.5e+109:
		tmp = z * y
	else:
		tmp = a * t
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -470000000000.0)
		tmp = Float64(a * t);
	elseif (t <= -9.8e-175)
		tmp = Float64(z * y);
	elseif (t <= -3.8e-265)
		tmp = x;
	elseif (t <= 3.15e-239)
		tmp = Float64(z * y);
	elseif (t <= 3e-171)
		tmp = x;
	elseif (t <= 8.5e+109)
		tmp = Float64(z * y);
	else
		tmp = Float64(a * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -470000000000.0)
		tmp = a * t;
	elseif (t <= -9.8e-175)
		tmp = z * y;
	elseif (t <= -3.8e-265)
		tmp = x;
	elseif (t <= 3.15e-239)
		tmp = z * y;
	elseif (t <= 3e-171)
		tmp = x;
	elseif (t <= 8.5e+109)
		tmp = z * y;
	else
		tmp = a * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -470000000000.0], N[(a * t), $MachinePrecision], If[LessEqual[t, -9.8e-175], N[(z * y), $MachinePrecision], If[LessEqual[t, -3.8e-265], x, If[LessEqual[t, 3.15e-239], N[(z * y), $MachinePrecision], If[LessEqual[t, 3e-171], x, If[LessEqual[t, 8.5e+109], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -470000000000:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;t \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-265}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.15 \cdot 10^{-239}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-171}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+109}:\\
\;\;\;\;z \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7e11 or 8.5000000000000004e109 < t

    1. Initial program 91.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.5%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative91.5%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define91.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*91.6%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified98.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 89.2%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 89.2%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*89.2%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified89.2%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around inf 63.9%

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

    if -4.7e11 < t < -9.79999999999999996e-175 or -3.7999999999999998e-265 < t < 3.15000000000000009e-239 or 3e-171 < t < 8.5000000000000004e109

    1. Initial program 95.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+95.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*93.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified93.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 42.9%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative42.9%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified42.9%

      \[\leadsto \color{blue}{z \cdot y} \]

    if -9.79999999999999996e-175 < t < -3.7999999999999998e-265 or 3.15000000000000009e-239 < t < 3e-171

    1. Initial program 97.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 58.3%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 72.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+28}:\\ \;\;\;\;a \cdot t + z \cdot y\\ \mathbf{elif}\;z \leq -980000:\\ \;\;\;\;x + a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-82}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+14}:\\ \;\;\;\;x + b \cdot \left(z \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (+ y (* a b)))))
   (if (<= z -3.8e+118)
     t_1
     (if (<= z -8e+28)
       (+ (* a t) (* z y))
       (if (<= z -980000.0)
         (+ x (* a (* z b)))
         (if (<= z 6e-82)
           (+ x (* a t))
           (if (<= z 1.45e+14) (+ x (* b (* z a))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (y + (a * b));
	double tmp;
	if (z <= -3.8e+118) {
		tmp = t_1;
	} else if (z <= -8e+28) {
		tmp = (a * t) + (z * y);
	} else if (z <= -980000.0) {
		tmp = x + (a * (z * b));
	} else if (z <= 6e-82) {
		tmp = x + (a * t);
	} else if (z <= 1.45e+14) {
		tmp = x + (b * (z * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (y + (a * b))
    if (z <= (-3.8d+118)) then
        tmp = t_1
    else if (z <= (-8d+28)) then
        tmp = (a * t) + (z * y)
    else if (z <= (-980000.0d0)) then
        tmp = x + (a * (z * b))
    else if (z <= 6d-82) then
        tmp = x + (a * t)
    else if (z <= 1.45d+14) then
        tmp = x + (b * (z * a))
    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 b) {
	double t_1 = z * (y + (a * b));
	double tmp;
	if (z <= -3.8e+118) {
		tmp = t_1;
	} else if (z <= -8e+28) {
		tmp = (a * t) + (z * y);
	} else if (z <= -980000.0) {
		tmp = x + (a * (z * b));
	} else if (z <= 6e-82) {
		tmp = x + (a * t);
	} else if (z <= 1.45e+14) {
		tmp = x + (b * (z * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (y + (a * b))
	tmp = 0
	if z <= -3.8e+118:
		tmp = t_1
	elif z <= -8e+28:
		tmp = (a * t) + (z * y)
	elif z <= -980000.0:
		tmp = x + (a * (z * b))
	elif z <= 6e-82:
		tmp = x + (a * t)
	elif z <= 1.45e+14:
		tmp = x + (b * (z * a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(y + Float64(a * b)))
	tmp = 0.0
	if (z <= -3.8e+118)
		tmp = t_1;
	elseif (z <= -8e+28)
		tmp = Float64(Float64(a * t) + Float64(z * y));
	elseif (z <= -980000.0)
		tmp = Float64(x + Float64(a * Float64(z * b)));
	elseif (z <= 6e-82)
		tmp = Float64(x + Float64(a * t));
	elseif (z <= 1.45e+14)
		tmp = Float64(x + Float64(b * Float64(z * a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (y + (a * b));
	tmp = 0.0;
	if (z <= -3.8e+118)
		tmp = t_1;
	elseif (z <= -8e+28)
		tmp = (a * t) + (z * y);
	elseif (z <= -980000.0)
		tmp = x + (a * (z * b));
	elseif (z <= 6e-82)
		tmp = x + (a * t);
	elseif (z <= 1.45e+14)
		tmp = x + (b * (z * a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+118], t$95$1, If[LessEqual[z, -8e+28], N[(N[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -980000.0], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-82], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+14], N[(x + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -8 \cdot 10^{+28}:\\
\;\;\;\;a \cdot t + z \cdot y\\

\mathbf{elif}\;z \leq -980000:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot t\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+14}:\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.80000000000000016e118 or 1.45e14 < z

    1. Initial program 90.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.4%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*86.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified86.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 80.7%

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    6. Step-by-step derivation
      1. +-commutative80.7%

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
    7. Simplified80.7%

      \[\leadsto \color{blue}{z \cdot \left(a \cdot b + y\right)} \]

    if -3.80000000000000016e118 < z < -7.99999999999999967e28

    1. Initial program 88.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+88.7%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 99.8%

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{a \cdot t} \]
    6. Taylor expanded in x around 0 96.6%

      \[\leadsto \color{blue}{a \cdot t + y \cdot z} \]

    if -7.99999999999999967e28 < z < -9.8e5

    1. Initial program 99.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+99.7%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative99.7%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 92.2%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around 0 92.2%

      \[\leadsto x + \color{blue}{a \cdot \left(b \cdot z\right)} \]

    if -9.8e5 < z < 5.9999999999999998e-82

    1. Initial program 96.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.4%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.9%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative79.9%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified79.9%

      \[\leadsto \color{blue}{a \cdot t + x} \]

    if 5.9999999999999998e-82 < z < 1.45e14

    1. Initial program 99.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+99.8%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative99.8%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 90.0%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 69.3%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*69.3%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified69.3%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around 0 84.7%

      \[\leadsto x + \color{blue}{a \cdot \left(b \cdot z\right)} \]
    10. Step-by-step derivation
      1. *-commutative84.7%

        \[\leadsto x + \color{blue}{\left(b \cdot z\right) \cdot a} \]
      2. associate-*r*84.8%

        \[\leadsto x + \color{blue}{b \cdot \left(z \cdot a\right)} \]
    11. Simplified84.8%

      \[\leadsto x + \color{blue}{b \cdot \left(z \cdot a\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification81.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+118}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+28}:\\ \;\;\;\;a \cdot t + z \cdot y\\ \mathbf{elif}\;z \leq -980000:\\ \;\;\;\;x + a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-82}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+14}:\\ \;\;\;\;x + b \cdot \left(z \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 96.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ t_2 := x + z \cdot y\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-209}:\\ \;\;\;\;t\_2 + a \cdot t\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+29}:\\ \;\;\;\;t\_2 + \left(a \cdot t + a \cdot \left(z \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))) (t_2 (+ x (* z y))))
   (if (<= z -2.25e-17)
     t_1
     (if (<= z -3e-209)
       (+ t_2 (* a t))
       (if (<= z 5e+29) (+ t_2 (+ (* a t) (* a (* z b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (y + ((a * (b + (t / z))) + (x / z)));
	double t_2 = x + (z * y);
	double tmp;
	if (z <= -2.25e-17) {
		tmp = t_1;
	} else if (z <= -3e-209) {
		tmp = t_2 + (a * t);
	} else if (z <= 5e+29) {
		tmp = t_2 + ((a * t) + (a * (z * b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = z * (y + ((a * (b + (t / z))) + (x / z)))
    t_2 = x + (z * y)
    if (z <= (-2.25d-17)) then
        tmp = t_1
    else if (z <= (-3d-209)) then
        tmp = t_2 + (a * t)
    else if (z <= 5d+29) then
        tmp = t_2 + ((a * t) + (a * (z * b)))
    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 b) {
	double t_1 = z * (y + ((a * (b + (t / z))) + (x / z)));
	double t_2 = x + (z * y);
	double tmp;
	if (z <= -2.25e-17) {
		tmp = t_1;
	} else if (z <= -3e-209) {
		tmp = t_2 + (a * t);
	} else if (z <= 5e+29) {
		tmp = t_2 + ((a * t) + (a * (z * b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (y + ((a * (b + (t / z))) + (x / z)))
	t_2 = x + (z * y)
	tmp = 0
	if z <= -2.25e-17:
		tmp = t_1
	elif z <= -3e-209:
		tmp = t_2 + (a * t)
	elif z <= 5e+29:
		tmp = t_2 + ((a * t) + (a * (z * b)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z))))
	t_2 = Float64(x + Float64(z * y))
	tmp = 0.0
	if (z <= -2.25e-17)
		tmp = t_1;
	elseif (z <= -3e-209)
		tmp = Float64(t_2 + Float64(a * t));
	elseif (z <= 5e+29)
		tmp = Float64(t_2 + Float64(Float64(a * t) + Float64(a * Float64(z * b))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (y + ((a * (b + (t / z))) + (x / z)));
	t_2 = x + (z * y);
	tmp = 0.0;
	if (z <= -2.25e-17)
		tmp = t_1;
	elseif (z <= -3e-209)
		tmp = t_2 + (a * t);
	elseif (z <= 5e+29)
		tmp = t_2 + ((a * t) + (a * (z * b)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e-17], t$95$1, If[LessEqual[z, -3e-209], N[(t$95$2 + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+29], N[(t$95$2 + N[(N[(a * t), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
t_2 := x + z \cdot y\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-209}:\\
\;\;\;\;t\_2 + a \cdot t\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+29}:\\
\;\;\;\;t\_2 + \left(a \cdot t + a \cdot \left(z \cdot b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.24999999999999989e-17 or 5.0000000000000001e29 < z

    1. Initial program 91.1%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.1%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*89.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.0%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 98.2%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative98.2%

        \[\leadsto z \cdot \left(y + \left(a \cdot b + \color{blue}{\left(\frac{a \cdot t}{z} + \frac{x}{z}\right)}\right)\right) \]
      2. associate-+r+98.2%

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

        \[\leadsto z \cdot \left(y + \left(\left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right) + \frac{x}{z}\right)\right) \]
      4. distribute-lft-out99.8%

        \[\leadsto z \cdot \left(y + \left(\color{blue}{a \cdot \left(b + \frac{t}{z}\right)} + \frac{x}{z}\right)\right) \]
    7. Simplified99.8%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)} \]

    if -2.24999999999999989e-17 < z < -2.9999999999999999e-209

    1. Initial program 94.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+94.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*94.6%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 95.0%

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{a \cdot t} \]

    if -2.9999999999999999e-209 < z < 5.0000000000000001e29

    1. Initial program 97.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.9%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*98.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified98.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-17}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-209}:\\ \;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+29}:\\ \;\;\;\;\left(x + z \cdot y\right) + \left(a \cdot t + a \cdot \left(z \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 94.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-17} \lor \neg \left(z \leq 8.5 \cdot 10^{-89}\right):\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -7.5e-17) (not (<= z 8.5e-89)))
   (* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))
   (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -7.5e-17) || !(z <= 8.5e-89)) {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	} else {
		tmp = (x + (z * y)) + (a * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((z <= (-7.5d-17)) .or. (.not. (z <= 8.5d-89))) then
        tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
    else
        tmp = (x + (z * y)) + (a * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -7.5e-17) || !(z <= 8.5e-89)) {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	} else {
		tmp = (x + (z * y)) + (a * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -7.5e-17) or not (z <= 8.5e-89):
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
	else:
		tmp = (x + (z * y)) + (a * t)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -7.5e-17) || !(z <= 8.5e-89))
		tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z))));
	else
		tmp = Float64(Float64(x + Float64(z * y)) + Float64(a * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -7.5e-17) || ~((z <= 8.5e-89)))
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	else
		tmp = (x + (z * y)) + (a * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.5e-17], N[Not[LessEqual[z, 8.5e-89]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-17} \lor \neg \left(z \leq 8.5 \cdot 10^{-89}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.49999999999999984e-17 or 8.49999999999999937e-89 < z

    1. Initial program 92.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+92.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*90.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified90.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 96.0%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative96.0%

        \[\leadsto z \cdot \left(y + \left(a \cdot b + \color{blue}{\left(\frac{a \cdot t}{z} + \frac{x}{z}\right)}\right)\right) \]
      2. associate-+r+96.0%

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

        \[\leadsto z \cdot \left(y + \left(\left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right) + \frac{x}{z}\right)\right) \]
      4. distribute-lft-out97.9%

        \[\leadsto z \cdot \left(y + \left(\color{blue}{a \cdot \left(b + \frac{t}{z}\right)} + \frac{x}{z}\right)\right) \]
    7. Simplified97.9%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)} \]

    if -7.49999999999999984e-17 < z < 8.49999999999999937e-89

    1. Initial program 96.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.2%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.1%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.1%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 93.0%

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{a \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-17} \lor \neg \left(z \leq 8.5 \cdot 10^{-89}\right):\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;z \leq -1500000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-82}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+14}:\\ \;\;\;\;x + b \cdot \left(z \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (+ y (* a b)))))
   (if (<= z -1500000.0)
     t_1
     (if (<= z 4e-82)
       (+ x (* a t))
       (if (<= z 4.9e+14) (+ x (* b (* z a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (y + (a * b));
	double tmp;
	if (z <= -1500000.0) {
		tmp = t_1;
	} else if (z <= 4e-82) {
		tmp = x + (a * t);
	} else if (z <= 4.9e+14) {
		tmp = x + (b * (z * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (y + (a * b))
    if (z <= (-1500000.0d0)) then
        tmp = t_1
    else if (z <= 4d-82) then
        tmp = x + (a * t)
    else if (z <= 4.9d+14) then
        tmp = x + (b * (z * a))
    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 b) {
	double t_1 = z * (y + (a * b));
	double tmp;
	if (z <= -1500000.0) {
		tmp = t_1;
	} else if (z <= 4e-82) {
		tmp = x + (a * t);
	} else if (z <= 4.9e+14) {
		tmp = x + (b * (z * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (y + (a * b))
	tmp = 0
	if z <= -1500000.0:
		tmp = t_1
	elif z <= 4e-82:
		tmp = x + (a * t)
	elif z <= 4.9e+14:
		tmp = x + (b * (z * a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(y + Float64(a * b)))
	tmp = 0.0
	if (z <= -1500000.0)
		tmp = t_1;
	elseif (z <= 4e-82)
		tmp = Float64(x + Float64(a * t));
	elseif (z <= 4.9e+14)
		tmp = Float64(x + Float64(b * Float64(z * a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (y + (a * b));
	tmp = 0.0;
	if (z <= -1500000.0)
		tmp = t_1;
	elseif (z <= 4e-82)
		tmp = x + (a * t);
	elseif (z <= 4.9e+14)
		tmp = x + (b * (z * a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1500000.0], t$95$1, If[LessEqual[z, 4e-82], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+14], N[(x + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1500000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot t\\

\mathbf{elif}\;z \leq 4.9 \cdot 10^{+14}:\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5e6 or 4.9e14 < z

    1. Initial program 90.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.7%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*88.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.2%

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    6. Step-by-step derivation
      1. +-commutative77.2%

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
    7. Simplified77.2%

      \[\leadsto \color{blue}{z \cdot \left(a \cdot b + y\right)} \]

    if -1.5e6 < z < 4e-82

    1. Initial program 96.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.4%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.9%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative79.9%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified79.9%

      \[\leadsto \color{blue}{a \cdot t + x} \]

    if 4e-82 < z < 4.9e14

    1. Initial program 99.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+99.8%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative99.8%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 90.0%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 69.3%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*69.3%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified69.3%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around 0 84.7%

      \[\leadsto x + \color{blue}{a \cdot \left(b \cdot z\right)} \]
    10. Step-by-step derivation
      1. *-commutative84.7%

        \[\leadsto x + \color{blue}{\left(b \cdot z\right) \cdot a} \]
      2. associate-*r*84.8%

        \[\leadsto x + \color{blue}{b \cdot \left(z \cdot a\right)} \]
    11. Simplified84.8%

      \[\leadsto x + \color{blue}{b \cdot \left(z \cdot a\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.0%

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

Alternative 10: 73.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;z \leq -1250000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-82}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 48000000000:\\ \;\;\;\;x + a \cdot \left(z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (+ y (* a b)))))
   (if (<= z -1250000.0)
     t_1
     (if (<= z 3.9e-82)
       (+ x (* a t))
       (if (<= z 48000000000.0) (+ x (* a (* z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (y + (a * b));
	double tmp;
	if (z <= -1250000.0) {
		tmp = t_1;
	} else if (z <= 3.9e-82) {
		tmp = x + (a * t);
	} else if (z <= 48000000000.0) {
		tmp = x + (a * (z * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (y + (a * b))
    if (z <= (-1250000.0d0)) then
        tmp = t_1
    else if (z <= 3.9d-82) then
        tmp = x + (a * t)
    else if (z <= 48000000000.0d0) then
        tmp = x + (a * (z * b))
    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 b) {
	double t_1 = z * (y + (a * b));
	double tmp;
	if (z <= -1250000.0) {
		tmp = t_1;
	} else if (z <= 3.9e-82) {
		tmp = x + (a * t);
	} else if (z <= 48000000000.0) {
		tmp = x + (a * (z * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (y + (a * b))
	tmp = 0
	if z <= -1250000.0:
		tmp = t_1
	elif z <= 3.9e-82:
		tmp = x + (a * t)
	elif z <= 48000000000.0:
		tmp = x + (a * (z * b))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(y + Float64(a * b)))
	tmp = 0.0
	if (z <= -1250000.0)
		tmp = t_1;
	elseif (z <= 3.9e-82)
		tmp = Float64(x + Float64(a * t));
	elseif (z <= 48000000000.0)
		tmp = Float64(x + Float64(a * Float64(z * b)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (y + (a * b));
	tmp = 0.0;
	if (z <= -1250000.0)
		tmp = t_1;
	elseif (z <= 3.9e-82)
		tmp = x + (a * t);
	elseif (z <= 48000000000.0)
		tmp = x + (a * (z * b));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1250000.0], t$95$1, If[LessEqual[z, 3.9e-82], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 48000000000.0], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1250000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot t\\

\mathbf{elif}\;z \leq 48000000000:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.25e6 or 4.8e10 < z

    1. Initial program 90.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.7%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*88.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.2%

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    6. Step-by-step derivation
      1. +-commutative77.2%

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
    7. Simplified77.2%

      \[\leadsto \color{blue}{z \cdot \left(a \cdot b + y\right)} \]

    if -1.25e6 < z < 3.89999999999999973e-82

    1. Initial program 96.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.4%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.9%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative79.9%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified79.9%

      \[\leadsto \color{blue}{a \cdot t + x} \]

    if 3.89999999999999973e-82 < z < 4.8e10

    1. Initial program 99.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+99.8%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative99.8%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 90.0%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around 0 84.7%

      \[\leadsto x + \color{blue}{a \cdot \left(b \cdot z\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1250000:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-82}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 48000000000:\\ \;\;\;\;x + a \cdot \left(z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 87.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+90} \lor \neg \left(b \leq 9 \cdot 10^{-20}\right):\\
\;\;\;\;x + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.99999999999999973e90 or 9.0000000000000003e-20 < b

    1. Initial program 93.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+93.9%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative93.9%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define93.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*88.8%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative88.8%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative88.8%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified93.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 86.3%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in b around inf 86.2%

      \[\leadsto x + \color{blue}{b \cdot \left(a \cdot z + \frac{a \cdot t}{b}\right)} \]
    7. Step-by-step derivation
      1. associate-/l*87.0%

        \[\leadsto x + b \cdot \left(a \cdot z + \color{blue}{a \cdot \frac{t}{b}}\right) \]
      2. distribute-lft-out87.9%

        \[\leadsto x + b \cdot \color{blue}{\left(a \cdot \left(z + \frac{t}{b}\right)\right)} \]
    8. Simplified87.9%

      \[\leadsto x + \color{blue}{b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)} \]

    if -7.99999999999999973e90 < b < 9.0000000000000003e-20

    1. Initial program 94.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+94.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 91.4%

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{a \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.9%

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

Alternative 12: 86.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{+88} \lor \neg \left(b \leq 3.05 \cdot 10^{+38}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -9.5e+88) (not (<= b 3.05e+38)))
   (+ x (* a (+ t (* z b))))
   (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -9.5e+88) || !(b <= 3.05e+38)) {
		tmp = x + (a * (t + (z * b)));
	} else {
		tmp = (x + (z * y)) + (a * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((b <= (-9.5d+88)) .or. (.not. (b <= 3.05d+38))) then
        tmp = x + (a * (t + (z * b)))
    else
        tmp = (x + (z * y)) + (a * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -9.5e+88) || !(b <= 3.05e+38)) {
		tmp = x + (a * (t + (z * b)));
	} else {
		tmp = (x + (z * y)) + (a * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -9.5e+88) or not (b <= 3.05e+38):
		tmp = x + (a * (t + (z * b)))
	else:
		tmp = (x + (z * y)) + (a * t)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -9.5e+88) || !(b <= 3.05e+38))
		tmp = Float64(x + Float64(a * Float64(t + Float64(z * b))));
	else
		tmp = Float64(Float64(x + Float64(z * y)) + Float64(a * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -9.5e+88) || ~((b <= 3.05e+38)))
		tmp = x + (a * (t + (z * b)));
	else
		tmp = (x + (z * y)) + (a * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.5e+88], N[Not[LessEqual[b, 3.05e+38]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+88} \lor \neg \left(b \leq 3.05 \cdot 10^{+38}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.50000000000000059e88 or 3.05e38 < b

    1. Initial program 94.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+94.0%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative94.0%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define94.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*89.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative89.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative89.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg93.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified93.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 89.0%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]

    if -9.50000000000000059e88 < b < 3.05e38

    1. Initial program 94.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+94.2%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*96.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 89.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{+88} \lor \neg \left(b \leq 3.05 \cdot 10^{+38}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 82.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+48} \lor \neg \left(z \leq 2.1 \cdot 10^{+32}\right):\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -6.5e+48) (not (<= z 2.1e+32)))
   (* z (+ y (* a b)))
   (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -6.5e+48) || !(z <= 2.1e+32)) {
		tmp = z * (y + (a * b));
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((z <= (-6.5d+48)) .or. (.not. (z <= 2.1d+32))) then
        tmp = z * (y + (a * b))
    else
        tmp = x + (a * (t + (z * b)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -6.5e+48) || !(z <= 2.1e+32)) {
		tmp = z * (y + (a * b));
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -6.5e+48) or not (z <= 2.1e+32):
		tmp = z * (y + (a * b))
	else:
		tmp = x + (a * (t + (z * b)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -6.5e+48) || !(z <= 2.1e+32))
		tmp = Float64(z * Float64(y + Float64(a * b)));
	else
		tmp = Float64(x + Float64(a * Float64(t + Float64(z * b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -6.5e+48) || ~((z <= 2.1e+32)))
		tmp = z * (y + (a * b));
	else
		tmp = x + (a * (t + (z * b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+48], N[Not[LessEqual[z, 2.1e+32]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+48} \lor \neg \left(z \leq 2.1 \cdot 10^{+32}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.49999999999999972e48 or 2.1000000000000001e32 < z

    1. Initial program 89.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+89.4%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*86.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified86.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 80.8%

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    6. Step-by-step derivation
      1. +-commutative80.8%

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
    7. Simplified80.8%

      \[\leadsto \color{blue}{z \cdot \left(a \cdot b + y\right)} \]

    if -6.49999999999999972e48 < z < 2.1000000000000001e32

    1. Initial program 97.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative97.3%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define97.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out99.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg99.9%

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out99.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg99.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg99.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in99.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg99.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 88.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+48} \lor \neg \left(z \leq 2.1 \cdot 10^{+32}\right):\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 74.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5600000 \lor \neg \left(z \leq 265000000000\right):\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -5600000.0) (not (<= z 265000000000.0)))
   (* z (+ y (* a b)))
   (+ x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -5600000.0) || !(z <= 265000000000.0)) {
		tmp = z * (y + (a * b));
	} else {
		tmp = x + (a * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((z <= (-5600000.0d0)) .or. (.not. (z <= 265000000000.0d0))) then
        tmp = z * (y + (a * b))
    else
        tmp = x + (a * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -5600000.0) || !(z <= 265000000000.0)) {
		tmp = z * (y + (a * b));
	} else {
		tmp = x + (a * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -5600000.0) or not (z <= 265000000000.0):
		tmp = z * (y + (a * b))
	else:
		tmp = x + (a * t)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -5600000.0) || !(z <= 265000000000.0))
		tmp = Float64(z * Float64(y + Float64(a * b)));
	else
		tmp = Float64(x + Float64(a * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -5600000.0) || ~((z <= 265000000000.0)))
		tmp = z * (y + (a * b));
	else
		tmp = x + (a * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5600000.0], N[Not[LessEqual[z, 265000000000.0]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5600000 \lor \neg \left(z \leq 265000000000\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6e6 or 2.65e11 < z

    1. Initial program 90.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.7%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*88.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.2%

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    6. Step-by-step derivation
      1. +-commutative77.2%

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
    7. Simplified77.2%

      \[\leadsto \color{blue}{z \cdot \left(a \cdot b + y\right)} \]

    if -5.6e6 < z < 2.65e11

    1. Initial program 97.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+97.0%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*97.7%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.7%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 76.2%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative76.2%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified76.2%

      \[\leadsto \color{blue}{a \cdot t + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5600000 \lor \neg \left(z \leq 265000000000\right):\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 62.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+19} \lor \neg \left(t \leq 5.2 \cdot 10^{+96}\right):\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -2.4e+19) (not (<= t 5.2e+96))) (+ x (* a t)) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -2.4e+19) || !(t <= 5.2e+96)) {
		tmp = x + (a * t);
	} else {
		tmp = x + (z * y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((t <= (-2.4d+19)) .or. (.not. (t <= 5.2d+96))) then
        tmp = x + (a * t)
    else
        tmp = x + (z * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -2.4e+19) || !(t <= 5.2e+96)) {
		tmp = x + (a * t);
	} else {
		tmp = x + (z * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -2.4e+19) or not (t <= 5.2e+96):
		tmp = x + (a * t)
	else:
		tmp = x + (z * y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -2.4e+19) || !(t <= 5.2e+96))
		tmp = Float64(x + Float64(a * t));
	else
		tmp = Float64(x + Float64(z * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -2.4e+19) || ~((t <= 5.2e+96)))
		tmp = x + (a * t);
	else
		tmp = x + (z * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.4e+19], N[Not[LessEqual[t, 5.2e+96]], $MachinePrecision]], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+19} \lor \neg \left(t \leq 5.2 \cdot 10^{+96}\right):\\
\;\;\;\;x + a \cdot t\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4e19 or 5.2e96 < t

    1. Initial program 90.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*91.7%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.7%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.3%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative79.3%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified79.3%

      \[\leadsto \color{blue}{a \cdot t + x} \]

    if -2.4e19 < t < 5.2e96

    1. Initial program 96.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*94.7%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 66.7%

      \[\leadsto \color{blue}{x + y \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.0%

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

Alternative 16: 57.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+103} \lor \neg \left(t \leq 10^{+105}\right):\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -8.5e+103) (not (<= t 1e+105))) (* a t) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -8.5e+103) || !(t <= 1e+105)) {
		tmp = a * t;
	} else {
		tmp = x + (z * y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((t <= (-8.5d+103)) .or. (.not. (t <= 1d+105))) then
        tmp = a * t
    else
        tmp = x + (z * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -8.5e+103) || !(t <= 1e+105)) {
		tmp = a * t;
	} else {
		tmp = x + (z * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -8.5e+103) or not (t <= 1e+105):
		tmp = a * t
	else:
		tmp = x + (z * y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -8.5e+103) || !(t <= 1e+105))
		tmp = Float64(a * t);
	else
		tmp = Float64(x + Float64(z * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -8.5e+103) || ~((t <= 1e+105)))
		tmp = a * t;
	else
		tmp = x + (z * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.5e+103], N[Not[LessEqual[t, 1e+105]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+103} \lor \neg \left(t \leq 10^{+105}\right):\\
\;\;\;\;a \cdot t\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.4999999999999992e103 or 9.9999999999999994e104 < t

    1. Initial program 90.1%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.1%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative90.1%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define90.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*90.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative90.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative90.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg97.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified97.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 91.8%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 91.8%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*91.8%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified91.8%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around inf 69.4%

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

    if -8.4999999999999992e103 < t < 9.9999999999999994e104

    1. Initial program 96.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*95.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified95.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 66.2%

      \[\leadsto \color{blue}{x + y \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.4%

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

Alternative 17: 61.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+92}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -5e+92)
   (* a (+ t (* z b)))
   (if (<= t 2.7e+97) (+ x (* z y)) (+ x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -5e+92) {
		tmp = a * (t + (z * b));
	} else if (t <= 2.7e+97) {
		tmp = x + (z * y);
	} else {
		tmp = x + (a * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (t <= (-5d+92)) then
        tmp = a * (t + (z * b))
    else if (t <= 2.7d+97) then
        tmp = x + (z * y)
    else
        tmp = x + (a * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -5e+92) {
		tmp = a * (t + (z * b));
	} else if (t <= 2.7e+97) {
		tmp = x + (z * y);
	} else {
		tmp = x + (a * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -5e+92:
		tmp = a * (t + (z * b))
	elif t <= 2.7e+97:
		tmp = x + (z * y)
	else:
		tmp = x + (a * t)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -5e+92)
		tmp = Float64(a * Float64(t + Float64(z * b)));
	elseif (t <= 2.7e+97)
		tmp = Float64(x + Float64(z * y));
	else
		tmp = Float64(x + Float64(a * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -5e+92)
		tmp = a * (t + (z * b));
	elseif (t <= 2.7e+97)
		tmp = x + (z * y);
	else
		tmp = x + (a * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5e+92], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+97], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+92}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\
\;\;\;\;x + z \cdot y\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.00000000000000022e92

    1. Initial program 94.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+94.4%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative94.4%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define94.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*90.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative90.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative90.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg96.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified96.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 92.8%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in x around 0 82.8%

      \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]

    if -5.00000000000000022e92 < t < 2.69999999999999993e97

    1. Initial program 96.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*95.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified95.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 66.2%

      \[\leadsto \color{blue}{x + y \cdot z} \]

    if 2.69999999999999993e97 < t

    1. Initial program 83.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+83.8%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*89.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 82.5%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative82.5%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+92}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 39.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+28} \lor \neg \left(t \leq 1.2 \cdot 10^{+100}\right):\\
\;\;\;\;a \cdot t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.99999999999999967e28 or 1.20000000000000006e100 < t

    1. Initial program 90.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.5%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative90.5%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define90.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      4. associate-*l*91.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative91.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative91.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-in98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg98.2%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z} \cdot b\right) \]
    3. Simplified98.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 88.2%

      \[\leadsto \color{blue}{x + a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around inf 88.2%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + \frac{b \cdot z}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/l*88.2%

        \[\leadsto x + a \cdot \left(t \cdot \left(1 + \color{blue}{b \cdot \frac{z}{t}}\right)\right) \]
    8. Simplified88.2%

      \[\leadsto x + a \cdot \color{blue}{\left(t \cdot \left(1 + b \cdot \frac{z}{t}\right)\right)} \]
    9. Taylor expanded in t around inf 65.2%

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

    if -7.99999999999999967e28 < t < 1.20000000000000006e100

    1. Initial program 96.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+96.6%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*94.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified94.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 31.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+28} \lor \neg \left(t \leq 1.2 \cdot 10^{+100}\right):\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 26.4% accurate, 15.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 94.1%

    \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l+94.1%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
    2. associate-*l*93.4%

      \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
  3. Simplified93.4%

    \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 24.8%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 97.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\ \mathbf{if}\;z < -11820553527347888000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\ \;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
   (if (< z -11820553527347888000.0)
     t_1
     (if (< z 4.7589743188364287e-122)
       (+ (* (+ (* b z) t) a) (+ (* z y) x))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * ((b * a) + y)) + (x + (t * a));
	double tmp;
	if (z < -11820553527347888000.0) {
		tmp = t_1;
	} else if (z < 4.7589743188364287e-122) {
		tmp = (((b * z) + t) * a) + ((z * y) + x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * ((b * a) + y)) + (x + (t * a))
    if (z < (-11820553527347888000.0d0)) then
        tmp = t_1
    else if (z < 4.7589743188364287d-122) then
        tmp = (((b * z) + t) * a) + ((z * y) + x)
    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 b) {
	double t_1 = (z * ((b * a) + y)) + (x + (t * a));
	double tmp;
	if (z < -11820553527347888000.0) {
		tmp = t_1;
	} else if (z < 4.7589743188364287e-122) {
		tmp = (((b * z) + t) * a) + ((z * y) + x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * ((b * a) + y)) + (x + (t * a))
	tmp = 0
	if z < -11820553527347888000.0:
		tmp = t_1
	elif z < 4.7589743188364287e-122:
		tmp = (((b * z) + t) * a) + ((z * y) + x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a)))
	tmp = 0.0
	if (z < -11820553527347888000.0)
		tmp = t_1;
	elseif (z < 4.7589743188364287e-122)
		tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * ((b * a) + y)) + (x + (t * a));
	tmp = 0.0;
	if (z < -11820553527347888000.0)
		tmp = t_1;
	elseif (z < 4.7589743188364287e-122)
		tmp = (((b * z) + t) * a) + ((z * y) + x);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024108 
(FPCore (x y z t a b)
  :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
  :precision binary64

  :alt
  (if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))

  (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))