Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.5% → 94.8%
Time: 9.8s
Alternatives: 15
Speedup: 0.5×

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 15 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.5% 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: 94.8% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.99999999999999991e68

    1. Initial program 77.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+77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e68 < a

    1. Initial program 98.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+68}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot z\right) + \left(\left(x + y \cdot z\right) + a \cdot t\right)\\ \end{array} \]

Alternative 2: 96.6% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\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.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]

    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. Taylor expanded in z around inf 66.7%

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

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

Alternative 3: 37.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+222}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+171}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-297}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-140}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 820000000:\\ \;\;\;\;b \cdot \left(a \cdot z\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+94}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -3e+222)
   x
   (if (<= x -1.25e+171)
     (* a t)
     (if (<= x -7.5e+110)
       x
       (if (<= x -3.2e-297)
         (* y z)
         (if (<= x 2.5e-140)
           (* a t)
           (if (<= x 820000000.0)
             (* b (* a z))
             (if (<= x 5e+94) (* a t) x))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -3e+222) {
		tmp = x;
	} else if (x <= -1.25e+171) {
		tmp = a * t;
	} else if (x <= -7.5e+110) {
		tmp = x;
	} else if (x <= -3.2e-297) {
		tmp = y * z;
	} else if (x <= 2.5e-140) {
		tmp = a * t;
	} else if (x <= 820000000.0) {
		tmp = b * (a * z);
	} else if (x <= 5e+94) {
		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 (x <= (-3d+222)) then
        tmp = x
    else if (x <= (-1.25d+171)) then
        tmp = a * t
    else if (x <= (-7.5d+110)) then
        tmp = x
    else if (x <= (-3.2d-297)) then
        tmp = y * z
    else if (x <= 2.5d-140) then
        tmp = a * t
    else if (x <= 820000000.0d0) then
        tmp = b * (a * z)
    else if (x <= 5d+94) 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 (x <= -3e+222) {
		tmp = x;
	} else if (x <= -1.25e+171) {
		tmp = a * t;
	} else if (x <= -7.5e+110) {
		tmp = x;
	} else if (x <= -3.2e-297) {
		tmp = y * z;
	} else if (x <= 2.5e-140) {
		tmp = a * t;
	} else if (x <= 820000000.0) {
		tmp = b * (a * z);
	} else if (x <= 5e+94) {
		tmp = a * t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -3e+222:
		tmp = x
	elif x <= -1.25e+171:
		tmp = a * t
	elif x <= -7.5e+110:
		tmp = x
	elif x <= -3.2e-297:
		tmp = y * z
	elif x <= 2.5e-140:
		tmp = a * t
	elif x <= 820000000.0:
		tmp = b * (a * z)
	elif x <= 5e+94:
		tmp = a * t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -3e+222)
		tmp = x;
	elseif (x <= -1.25e+171)
		tmp = Float64(a * t);
	elseif (x <= -7.5e+110)
		tmp = x;
	elseif (x <= -3.2e-297)
		tmp = Float64(y * z);
	elseif (x <= 2.5e-140)
		tmp = Float64(a * t);
	elseif (x <= 820000000.0)
		tmp = Float64(b * Float64(a * z));
	elseif (x <= 5e+94)
		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 (x <= -3e+222)
		tmp = x;
	elseif (x <= -1.25e+171)
		tmp = a * t;
	elseif (x <= -7.5e+110)
		tmp = x;
	elseif (x <= -3.2e-297)
		tmp = y * z;
	elseif (x <= 2.5e-140)
		tmp = a * t;
	elseif (x <= 820000000.0)
		tmp = b * (a * z);
	elseif (x <= 5e+94)
		tmp = a * t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3e+222], x, If[LessEqual[x, -1.25e+171], N[(a * t), $MachinePrecision], If[LessEqual[x, -7.5e+110], x, If[LessEqual[x, -3.2e-297], N[(y * z), $MachinePrecision], If[LessEqual[x, 2.5e-140], N[(a * t), $MachinePrecision], If[LessEqual[x, 820000000.0], N[(b * N[(a * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+94], N[(a * t), $MachinePrecision], x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+222}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{+171}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{+110}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-297}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{-140}:\\
\;\;\;\;a \cdot t\\

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

\mathbf{elif}\;x \leq 5 \cdot 10^{+94}:\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.00000000000000014e222 or -1.2500000000000001e171 < x < -7.5e110 or 5.0000000000000001e94 < x

    1. Initial program 100.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+100.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*92.6%

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

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

      \[\leadsto \color{blue}{x} \]

    if -3.00000000000000014e222 < x < -1.2500000000000001e171 or -3.19999999999999972e-297 < x < 2.50000000000000007e-140 or 8.2e8 < x < 5.0000000000000001e94

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

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

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

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

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

    if -7.5e110 < x < -3.19999999999999972e-297

    1. Initial program 90.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+90.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*93.3%

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

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

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

        \[\leadsto \color{blue}{z \cdot y} \]
    6. Simplified41.6%

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

    if 2.50000000000000007e-140 < x < 8.2e8

    1. Initial program 93.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+93.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative87.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-out87.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-neg87.9%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg87.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-in87.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-neg87.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot z} \]
      2. *-commutative46.1%

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot z \]
      3. associate-*l*51.6%

        \[\leadsto \color{blue}{b \cdot \left(a \cdot z\right)} \]
    8. Simplified51.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+222}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+171}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-297}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-140}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 820000000:\\ \;\;\;\;b \cdot \left(a \cdot z\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+94}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 92.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.6 \cdot 10^{+117}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(a \cdot \left(z \cdot b\right) + a \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.5999999999999999e117

    1. Initial program 95.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+95.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*95.9%

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

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

    if 2.5999999999999999e117 < b

    1. Initial program 86.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+86.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*70.7%

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

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

      \[\leadsto \color{blue}{x + \left(a \cdot \left(b \cdot z\right) + y \cdot z\right)} \]
    5. Step-by-step derivation
      1. +-commutative68.4%

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

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

        \[\leadsto \left(y \cdot z + \color{blue}{\left(a \cdot b\right) \cdot z}\right) + x \]
      4. distribute-rgt-in84.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.6 \cdot 10^{+117}:\\ \;\;\;\;\left(x + y \cdot z\right) + \left(a \cdot \left(z \cdot b\right) + a \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \end{array} \]

Alternative 5: 38.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+152}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{+28}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-265}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-202}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+19}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -1.12e+152)
   (* a t)
   (if (<= a -8.6e+99)
     x
     (if (<= a -2.7e+28)
       (* a t)
       (if (<= a 1.5e-265)
         (* y z)
         (if (<= a 2e-202) x (if (<= a 1.1e+19) (* y z) (* a t))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.12e+152) {
		tmp = a * t;
	} else if (a <= -8.6e+99) {
		tmp = x;
	} else if (a <= -2.7e+28) {
		tmp = a * t;
	} else if (a <= 1.5e-265) {
		tmp = y * z;
	} else if (a <= 2e-202) {
		tmp = x;
	} else if (a <= 1.1e+19) {
		tmp = y * z;
	} 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 (a <= (-1.12d+152)) then
        tmp = a * t
    else if (a <= (-8.6d+99)) then
        tmp = x
    else if (a <= (-2.7d+28)) then
        tmp = a * t
    else if (a <= 1.5d-265) then
        tmp = y * z
    else if (a <= 2d-202) then
        tmp = x
    else if (a <= 1.1d+19) then
        tmp = y * z
    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 (a <= -1.12e+152) {
		tmp = a * t;
	} else if (a <= -8.6e+99) {
		tmp = x;
	} else if (a <= -2.7e+28) {
		tmp = a * t;
	} else if (a <= 1.5e-265) {
		tmp = y * z;
	} else if (a <= 2e-202) {
		tmp = x;
	} else if (a <= 1.1e+19) {
		tmp = y * z;
	} else {
		tmp = a * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -1.12e+152:
		tmp = a * t
	elif a <= -8.6e+99:
		tmp = x
	elif a <= -2.7e+28:
		tmp = a * t
	elif a <= 1.5e-265:
		tmp = y * z
	elif a <= 2e-202:
		tmp = x
	elif a <= 1.1e+19:
		tmp = y * z
	else:
		tmp = a * t
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -1.12e+152)
		tmp = Float64(a * t);
	elseif (a <= -8.6e+99)
		tmp = x;
	elseif (a <= -2.7e+28)
		tmp = Float64(a * t);
	elseif (a <= 1.5e-265)
		tmp = Float64(y * z);
	elseif (a <= 2e-202)
		tmp = x;
	elseif (a <= 1.1e+19)
		tmp = Float64(y * z);
	else
		tmp = Float64(a * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -1.12e+152)
		tmp = a * t;
	elseif (a <= -8.6e+99)
		tmp = x;
	elseif (a <= -2.7e+28)
		tmp = a * t;
	elseif (a <= 1.5e-265)
		tmp = y * z;
	elseif (a <= 2e-202)
		tmp = x;
	elseif (a <= 1.1e+19)
		tmp = y * z;
	else
		tmp = a * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.12e+152], N[(a * t), $MachinePrecision], If[LessEqual[a, -8.6e+99], x, If[LessEqual[a, -2.7e+28], N[(a * t), $MachinePrecision], If[LessEqual[a, 1.5e-265], N[(y * z), $MachinePrecision], If[LessEqual[a, 2e-202], x, If[LessEqual[a, 1.1e+19], N[(y * z), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{+152}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;a \leq -8.6 \cdot 10^{+99}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-265}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq 2 \cdot 10^{-202}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+19}:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.11999999999999995e152 or -8.6000000000000003e99 < a < -2.7000000000000002e28 or 1.1e19 < a

    1. Initial program 88.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+88.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*93.3%

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

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

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

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

    if -1.11999999999999995e152 < a < -8.6000000000000003e99 or 1.4999999999999999e-265 < a < 2.0000000000000001e-202

    1. Initial program 89.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+89.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.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. Taylor expanded in x around inf 46.0%

      \[\leadsto \color{blue}{x} \]

    if -2.7000000000000002e28 < a < 1.4999999999999999e-265 or 2.0000000000000001e-202 < a < 1.1e19

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

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

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

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

        \[\leadsto \color{blue}{z \cdot y} \]
    6. Simplified47.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+152}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{+28}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-265}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-202}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+19}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \]

Alternative 6: 73.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+152} \lor \neg \left(a \leq -5.2 \cdot 10^{+127}\right) \land \left(a \leq -22500 \lor \neg \left(a \leq 2.05 \cdot 10^{+17}\right)\right):\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -1.12e+152)
         (and (not (<= a -5.2e+127))
              (or (<= a -22500.0) (not (<= a 2.05e+17)))))
   (* a (+ t (* z b)))
   (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.12e+152) || (!(a <= -5.2e+127) && ((a <= -22500.0) || !(a <= 2.05e+17)))) {
		tmp = a * (t + (z * b));
	} else {
		tmp = x + (y * z);
	}
	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 ((a <= (-1.12d+152)) .or. (.not. (a <= (-5.2d+127))) .and. (a <= (-22500.0d0)) .or. (.not. (a <= 2.05d+17))) then
        tmp = a * (t + (z * b))
    else
        tmp = x + (y * z)
    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 ((a <= -1.12e+152) || (!(a <= -5.2e+127) && ((a <= -22500.0) || !(a <= 2.05e+17)))) {
		tmp = a * (t + (z * b));
	} else {
		tmp = x + (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -1.12e+152) or (not (a <= -5.2e+127) and ((a <= -22500.0) or not (a <= 2.05e+17))):
		tmp = a * (t + (z * b))
	else:
		tmp = x + (y * z)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -1.12e+152) || (!(a <= -5.2e+127) && ((a <= -22500.0) || !(a <= 2.05e+17))))
		tmp = Float64(a * Float64(t + Float64(z * b)));
	else
		tmp = Float64(x + Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -1.12e+152) || (~((a <= -5.2e+127)) && ((a <= -22500.0) || ~((a <= 2.05e+17)))))
		tmp = a * (t + (z * b));
	else
		tmp = x + (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.12e+152], And[N[Not[LessEqual[a, -5.2e+127]], $MachinePrecision], Or[LessEqual[a, -22500.0], N[Not[LessEqual[a, 2.05e+17]], $MachinePrecision]]]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{+152} \lor \neg \left(a \leq -5.2 \cdot 10^{+127}\right) \land \left(a \leq -22500 \lor \neg \left(a \leq 2.05 \cdot 10^{+17}\right)\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.11999999999999995e152 or -5.2000000000000004e127 < a < -22500 or 2.05e17 < a

    1. Initial program 89.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+89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.11999999999999995e152 < a < -5.2000000000000004e127 or -22500 < a < 2.05e17

    1. Initial program 97.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+97.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*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. Taylor expanded in a around 0 74.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+152} \lor \neg \left(a \leq -5.2 \cdot 10^{+127}\right) \land \left(a \leq -22500 \lor \neg \left(a \leq 2.05 \cdot 10^{+17}\right)\right):\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]

Alternative 7: 72.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + a \cdot t\\ t_2 := z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{-52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.75 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 2100000000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* a t))) (t_2 (* z (+ y (* a b)))))
   (if (<= z -5.3e-52)
     t_2
     (if (<= z 3.75e-152)
       t_1
       (if (<= z 5.2e-61)
         (* a (+ t (* z b)))
         (if (<= z 2100000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a * t);
	double t_2 = z * (y + (a * b));
	double tmp;
	if (z <= -5.3e-52) {
		tmp = t_2;
	} else if (z <= 3.75e-152) {
		tmp = t_1;
	} else if (z <= 5.2e-61) {
		tmp = a * (t + (z * b));
	} else if (z <= 2100000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = x + (a * t)
    t_2 = z * (y + (a * b))
    if (z <= (-5.3d-52)) then
        tmp = t_2
    else if (z <= 3.75d-152) then
        tmp = t_1
    else if (z <= 5.2d-61) then
        tmp = a * (t + (z * b))
    else if (z <= 2100000000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a * t);
	double t_2 = z * (y + (a * b));
	double tmp;
	if (z <= -5.3e-52) {
		tmp = t_2;
	} else if (z <= 3.75e-152) {
		tmp = t_1;
	} else if (z <= 5.2e-61) {
		tmp = a * (t + (z * b));
	} else if (z <= 2100000000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (a * t)
	t_2 = z * (y + (a * b))
	tmp = 0
	if z <= -5.3e-52:
		tmp = t_2
	elif z <= 3.75e-152:
		tmp = t_1
	elif z <= 5.2e-61:
		tmp = a * (t + (z * b))
	elif z <= 2100000000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(a * t))
	t_2 = Float64(z * Float64(y + Float64(a * b)))
	tmp = 0.0
	if (z <= -5.3e-52)
		tmp = t_2;
	elseif (z <= 3.75e-152)
		tmp = t_1;
	elseif (z <= 5.2e-61)
		tmp = Float64(a * Float64(t + Float64(z * b)));
	elseif (z <= 2100000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (a * t);
	t_2 = z * (y + (a * b));
	tmp = 0.0;
	if (z <= -5.3e-52)
		tmp = t_2;
	elseif (z <= 3.75e-152)
		tmp = t_1;
	elseif (z <= 5.2e-61)
		tmp = a * (t + (z * b));
	elseif (z <= 2100000000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e-52], t$95$2, If[LessEqual[z, 3.75e-152], t$95$1, If[LessEqual[z, 5.2e-61], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2100000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.75 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2100000000000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.3000000000000003e-52 or 2.1e12 < z

    1. Initial program 88.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+88.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*85.5%

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

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

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

    if -5.3000000000000003e-52 < z < 3.75e-152 or 5.20000000000000021e-61 < z < 2.1e12

    1. Initial program 100.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+100.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*100.0%

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

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

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

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

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

    if 3.75e-152 < z < 5.20000000000000021e-61

    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. +-commutative99.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(a \cdot t + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      7. distribute-lft-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. Taylor expanded in y around 0 89.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{-52}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq 3.75 \cdot 10^{-152}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 2100000000000:\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \end{array} \]

Alternative 8: 84.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+18}:\\
\;\;\;\;\left(x + y \cdot z\right) + a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.90000000000000003e129

    1. Initial program 99.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Taylor expanded in x around 0 87.0%

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

    if -1.90000000000000003e129 < b < 2.4e18

    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.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. Taylor expanded in t around inf 94.0%

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

    if 2.4e18 < b

    1. Initial program 88.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+88.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*78.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{+129}:\\ \;\;\;\;b \cdot \left(a \cdot z\right) + \left(y \cdot z + a \cdot t\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+18}:\\ \;\;\;\;\left(x + y \cdot z\right) + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \end{array} \]

Alternative 9: 58.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+152} \lor \neg \left(a \leq -1.05 \cdot 10^{+101} \lor \neg \left(a \leq -1.55 \cdot 10^{+31}\right) \land a \leq 7.4 \cdot 10^{+18}\right):\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -2.05e+152)
         (not
          (or (<= a -1.05e+101) (and (not (<= a -1.55e+31)) (<= a 7.4e+18)))))
   (* a t)
   (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -2.05e+152) || !((a <= -1.05e+101) || (!(a <= -1.55e+31) && (a <= 7.4e+18)))) {
		tmp = a * t;
	} else {
		tmp = x + (y * z);
	}
	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 ((a <= (-2.05d+152)) .or. (.not. (a <= (-1.05d+101)) .or. (.not. (a <= (-1.55d+31))) .and. (a <= 7.4d+18))) then
        tmp = a * t
    else
        tmp = x + (y * z)
    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 ((a <= -2.05e+152) || !((a <= -1.05e+101) || (!(a <= -1.55e+31) && (a <= 7.4e+18)))) {
		tmp = a * t;
	} else {
		tmp = x + (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -2.05e+152) or not ((a <= -1.05e+101) or (not (a <= -1.55e+31) and (a <= 7.4e+18))):
		tmp = a * t
	else:
		tmp = x + (y * z)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -2.05e+152) || !((a <= -1.05e+101) || (!(a <= -1.55e+31) && (a <= 7.4e+18))))
		tmp = Float64(a * t);
	else
		tmp = Float64(x + Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -2.05e+152) || ~(((a <= -1.05e+101) || (~((a <= -1.55e+31)) && (a <= 7.4e+18)))))
		tmp = a * t;
	else
		tmp = x + (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.05e+152], N[Not[Or[LessEqual[a, -1.05e+101], And[N[Not[LessEqual[a, -1.55e+31]], $MachinePrecision], LessEqual[a, 7.4e+18]]]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+152} \lor \neg \left(a \leq -1.05 \cdot 10^{+101} \lor \neg \left(a \leq -1.55 \cdot 10^{+31}\right) \land a \leq 7.4 \cdot 10^{+18}\right):\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.0499999999999999e152 or -1.05e101 < a < -1.5500000000000001e31 or 7.4e18 < a

    1. Initial program 88.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+88.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*93.3%

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

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

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

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

    if -2.0499999999999999e152 < a < -1.05e101 or -1.5500000000000001e31 < a < 7.4e18

    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. associate-*l*91.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+152} \lor \neg \left(a \leq -1.05 \cdot 10^{+101} \lor \neg \left(a \leq -1.55 \cdot 10^{+31}\right) \land a \leq 7.4 \cdot 10^{+18}\right):\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]

Alternative 10: 82.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{+41} \lor \neg \left(z \leq 1.8 \cdot 10^{+125}\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.1e+41) (not (<= z 1.8e+125)))
   (* 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.1e+41) || !(z <= 1.8e+125)) {
		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.1d+41)) .or. (.not. (z <= 1.8d+125))) 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.1e+41) || !(z <= 1.8e+125)) {
		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.1e+41) or not (z <= 1.8e+125):
		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.1e+41) || !(z <= 1.8e+125))
		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.1e+41) || ~((z <= 1.8e+125)))
		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.1e+41], N[Not[LessEqual[z, 1.8e+125]], $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.1 \cdot 10^{+41} \lor \neg \left(z \leq 1.8 \cdot 10^{+125}\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.09999999999999998e41 or 1.8000000000000002e125 < z

    1. Initial program 86.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+86.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*82.3%

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

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

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

    if -6.09999999999999998e41 < z < 1.8000000000000002e125

    1. Initial program 98.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+98.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(a \cdot t + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      7. distribute-lft-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. Taylor expanded in y around 0 84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{+41} \lor \neg \left(z \leq 1.8 \cdot 10^{+125}\right):\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]

Alternative 11: 87.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+24} \lor \neg \left(a \leq 2.35 \cdot 10^{+15}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.02000000000000004e24 or 2.35e15 < a

    1. Initial program 87.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+87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02000000000000004e24 < a < 2.35e15

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

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

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

      \[\leadsto \color{blue}{x + \left(a \cdot \left(b \cdot z\right) + y \cdot z\right)} \]
    5. Step-by-step derivation
      1. +-commutative78.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{+24} \lor \neg \left(a \leq 2.35 \cdot 10^{+15}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \end{array} \]

Alternative 12: 86.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq 9.8 \cdot 10^{+17}:\\
\;\;\;\;\left(x + y \cdot z\right) + a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.19999999999999958e86

    1. Initial program 93.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+93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.19999999999999958e86 < b < 9.8e17

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

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

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

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

    if 9.8e17 < b

    1. Initial program 88.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+88.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*78.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.2 \cdot 10^{+86}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{+17}:\\ \;\;\;\;\left(x + y \cdot z\right) + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \end{array} \]

Alternative 13: 38.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+222}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+171} \lor \neg \left(x \leq -4.8 \cdot 10^{+103}\right) \land x \leq 8.6 \cdot 10^{+93}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -3e+222)
   x
   (if (or (<= x -1.25e+171) (and (not (<= x -4.8e+103)) (<= x 8.6e+93)))
     (* a t)
     x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -3e+222) {
		tmp = x;
	} else if ((x <= -1.25e+171) || (!(x <= -4.8e+103) && (x <= 8.6e+93))) {
		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 (x <= (-3d+222)) then
        tmp = x
    else if ((x <= (-1.25d+171)) .or. (.not. (x <= (-4.8d+103))) .and. (x <= 8.6d+93)) 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 (x <= -3e+222) {
		tmp = x;
	} else if ((x <= -1.25e+171) || (!(x <= -4.8e+103) && (x <= 8.6e+93))) {
		tmp = a * t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -3e+222:
		tmp = x
	elif (x <= -1.25e+171) or (not (x <= -4.8e+103) and (x <= 8.6e+93)):
		tmp = a * t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -3e+222)
		tmp = x;
	elseif ((x <= -1.25e+171) || (!(x <= -4.8e+103) && (x <= 8.6e+93)))
		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 (x <= -3e+222)
		tmp = x;
	elseif ((x <= -1.25e+171) || (~((x <= -4.8e+103)) && (x <= 8.6e+93)))
		tmp = a * t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3e+222], x, If[Or[LessEqual[x, -1.25e+171], And[N[Not[LessEqual[x, -4.8e+103]], $MachinePrecision], LessEqual[x, 8.6e+93]]], N[(a * t), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+222}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.25 \cdot 10^{+171} \lor \neg \left(x \leq -4.8 \cdot 10^{+103}\right) \land x \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.00000000000000014e222 or -1.2500000000000001e171 < x < -4.7999999999999997e103 or 8.6e93 < x

    1. Initial program 100.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+100.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*93.0%

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

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

      \[\leadsto \color{blue}{x} \]

    if -3.00000000000000014e222 < x < -1.2500000000000001e171 or -4.7999999999999997e103 < x < 8.6e93

    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. associate-*l*92.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+222}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+171} \lor \neg \left(x \leq -4.8 \cdot 10^{+103}\right) \land x \leq 8.6 \cdot 10^{+93}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 64.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+30} \lor \neg \left(a \leq 5 \cdot 10^{+16}\right):\\
\;\;\;\;x + a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.00000000000000042e30 or 5e16 < a

    1. Initial program 87.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+87.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*93.3%

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

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

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

        \[\leadsto \color{blue}{a \cdot t + x} \]
    6. Simplified60.0%

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

    if -7.00000000000000042e30 < a < 5e16

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+30} \lor \neg \left(a \leq 5 \cdot 10^{+16}\right):\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]

Alternative 15: 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 93.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+93.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*92.3%

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification23.0%

    \[\leadsto x \]

Developer target: 97.3% accurate, 0.9× 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 2023334 
(FPCore (x y z t a b)
  :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
  :precision binary64

  :herbie-target
  (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)))