Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.6% → 96.7%
Time: 13.7s
Alternatives: 15
Speedup: 0.8×

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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 0.5× speedup?

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

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

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

      \[\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. *-commutative0.0%

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative0.0%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in z around inf 35.7%

      \[\leadsto \color{blue}{a \cdot t + a \cdot \left(b \cdot z\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-in92.9%

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

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

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

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

Alternative 2: 37.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -30000:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-180}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-21}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+62} \lor \neg \left(z \leq 1.56 \cdot 10^{+100}\right) \land z \leq 2.5 \cdot 10^{+216}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -30000.0)
   (* y z)
   (if (<= z -2.95e-133)
     x
     (if (<= z -1.5e-180)
       (* t a)
       (if (<= z 1.7e-279)
         x
         (if (<= z 5.9e-21)
           (* t a)
           (if (<= z 5.7e+41)
             x
             (if (or (<= z 7.5e+62)
                     (and (not (<= z 1.56e+100)) (<= z 2.5e+216)))
               (* y z)
               (* a (* z b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -30000.0) {
		tmp = y * z;
	} else if (z <= -2.95e-133) {
		tmp = x;
	} else if (z <= -1.5e-180) {
		tmp = t * a;
	} else if (z <= 1.7e-279) {
		tmp = x;
	} else if (z <= 5.9e-21) {
		tmp = t * a;
	} else if (z <= 5.7e+41) {
		tmp = x;
	} else if ((z <= 7.5e+62) || (!(z <= 1.56e+100) && (z <= 2.5e+216))) {
		tmp = y * z;
	} else {
		tmp = a * (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 <= (-30000.0d0)) then
        tmp = y * z
    else if (z <= (-2.95d-133)) then
        tmp = x
    else if (z <= (-1.5d-180)) then
        tmp = t * a
    else if (z <= 1.7d-279) then
        tmp = x
    else if (z <= 5.9d-21) then
        tmp = t * a
    else if (z <= 5.7d+41) then
        tmp = x
    else if ((z <= 7.5d+62) .or. (.not. (z <= 1.56d+100)) .and. (z <= 2.5d+216)) then
        tmp = y * z
    else
        tmp = a * (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 <= -30000.0) {
		tmp = y * z;
	} else if (z <= -2.95e-133) {
		tmp = x;
	} else if (z <= -1.5e-180) {
		tmp = t * a;
	} else if (z <= 1.7e-279) {
		tmp = x;
	} else if (z <= 5.9e-21) {
		tmp = t * a;
	} else if (z <= 5.7e+41) {
		tmp = x;
	} else if ((z <= 7.5e+62) || (!(z <= 1.56e+100) && (z <= 2.5e+216))) {
		tmp = y * z;
	} else {
		tmp = a * (z * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -30000.0:
		tmp = y * z
	elif z <= -2.95e-133:
		tmp = x
	elif z <= -1.5e-180:
		tmp = t * a
	elif z <= 1.7e-279:
		tmp = x
	elif z <= 5.9e-21:
		tmp = t * a
	elif z <= 5.7e+41:
		tmp = x
	elif (z <= 7.5e+62) or (not (z <= 1.56e+100) and (z <= 2.5e+216)):
		tmp = y * z
	else:
		tmp = a * (z * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -30000.0)
		tmp = Float64(y * z);
	elseif (z <= -2.95e-133)
		tmp = x;
	elseif (z <= -1.5e-180)
		tmp = Float64(t * a);
	elseif (z <= 1.7e-279)
		tmp = x;
	elseif (z <= 5.9e-21)
		tmp = Float64(t * a);
	elseif (z <= 5.7e+41)
		tmp = x;
	elseif ((z <= 7.5e+62) || (!(z <= 1.56e+100) && (z <= 2.5e+216)))
		tmp = Float64(y * z);
	else
		tmp = Float64(a * Float64(z * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -30000.0)
		tmp = y * z;
	elseif (z <= -2.95e-133)
		tmp = x;
	elseif (z <= -1.5e-180)
		tmp = t * a;
	elseif (z <= 1.7e-279)
		tmp = x;
	elseif (z <= 5.9e-21)
		tmp = t * a;
	elseif (z <= 5.7e+41)
		tmp = x;
	elseif ((z <= 7.5e+62) || (~((z <= 1.56e+100)) && (z <= 2.5e+216)))
		tmp = y * z;
	else
		tmp = a * (z * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -30000.0], N[(y * z), $MachinePrecision], If[LessEqual[z, -2.95e-133], x, If[LessEqual[z, -1.5e-180], N[(t * a), $MachinePrecision], If[LessEqual[z, 1.7e-279], x, If[LessEqual[z, 5.9e-21], N[(t * a), $MachinePrecision], If[LessEqual[z, 5.7e+41], x, If[Or[LessEqual[z, 7.5e+62], And[N[Not[LessEqual[z, 1.56e+100]], $MachinePrecision], LessEqual[z, 2.5e+216]]], N[(y * z), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -30000:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;z \leq -2.95 \cdot 10^{-133}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-180}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-279}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.9 \cdot 10^{-21}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 5.7 \cdot 10^{+41}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+62} \lor \neg \left(z \leq 1.56 \cdot 10^{+100}\right) \land z \leq 2.5 \cdot 10^{+216}:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3e4 or 5.70000000000000021e41 < z < 7.49999999999999998e62 or 1.55999999999999998e100 < z < 2.4999999999999999e216

    1. Initial program 92.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+92.1%

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

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

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

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

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

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

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

    if -3e4 < z < -2.94999999999999982e-133 or -1.5e-180 < z < 1.70000000000000007e-279 or 5.9000000000000003e-21 < z < 5.70000000000000021e41

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

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

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

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

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

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

    if -2.94999999999999982e-133 < z < -1.5e-180 or 1.70000000000000007e-279 < z < 5.9000000000000003e-21

    1. Initial program 97.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+97.1%

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr89.2%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in t around inf 54.0%

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

    if 7.49999999999999998e62 < z < 1.55999999999999998e100 or 2.4999999999999999e216 < z

    1. Initial program 60.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+60.4%

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative67.9%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr67.9%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in z around inf 81.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -30000:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-180}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-21}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+62} \lor \neg \left(z \leq 1.56 \cdot 10^{+100}\right) \land z \leq 2.5 \cdot 10^{+216}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]

Alternative 3: 38.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2300000:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-181}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-21}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+62}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+205}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+217}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -2300000.0)
   (* y z)
   (if (<= z -1.02e-141)
     x
     (if (<= z -1.15e-181)
       (* t a)
       (if (<= z 4.6e-279)
         x
         (if (<= z 5.6e-21)
           (* t a)
           (if (<= z 3.6e+43)
             x
             (if (<= z 5.5e+62)
               (* y z)
               (if (<= z 1.1e+205)
                 (* z (* a b))
                 (if (<= z 2.4e+217) (* y z) (* a (* z b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2300000.0) {
		tmp = y * z;
	} else if (z <= -1.02e-141) {
		tmp = x;
	} else if (z <= -1.15e-181) {
		tmp = t * a;
	} else if (z <= 4.6e-279) {
		tmp = x;
	} else if (z <= 5.6e-21) {
		tmp = t * a;
	} else if (z <= 3.6e+43) {
		tmp = x;
	} else if (z <= 5.5e+62) {
		tmp = y * z;
	} else if (z <= 1.1e+205) {
		tmp = z * (a * b);
	} else if (z <= 2.4e+217) {
		tmp = y * z;
	} else {
		tmp = a * (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 <= (-2300000.0d0)) then
        tmp = y * z
    else if (z <= (-1.02d-141)) then
        tmp = x
    else if (z <= (-1.15d-181)) then
        tmp = t * a
    else if (z <= 4.6d-279) then
        tmp = x
    else if (z <= 5.6d-21) then
        tmp = t * a
    else if (z <= 3.6d+43) then
        tmp = x
    else if (z <= 5.5d+62) then
        tmp = y * z
    else if (z <= 1.1d+205) then
        tmp = z * (a * b)
    else if (z <= 2.4d+217) then
        tmp = y * z
    else
        tmp = a * (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 <= -2300000.0) {
		tmp = y * z;
	} else if (z <= -1.02e-141) {
		tmp = x;
	} else if (z <= -1.15e-181) {
		tmp = t * a;
	} else if (z <= 4.6e-279) {
		tmp = x;
	} else if (z <= 5.6e-21) {
		tmp = t * a;
	} else if (z <= 3.6e+43) {
		tmp = x;
	} else if (z <= 5.5e+62) {
		tmp = y * z;
	} else if (z <= 1.1e+205) {
		tmp = z * (a * b);
	} else if (z <= 2.4e+217) {
		tmp = y * z;
	} else {
		tmp = a * (z * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -2300000.0:
		tmp = y * z
	elif z <= -1.02e-141:
		tmp = x
	elif z <= -1.15e-181:
		tmp = t * a
	elif z <= 4.6e-279:
		tmp = x
	elif z <= 5.6e-21:
		tmp = t * a
	elif z <= 3.6e+43:
		tmp = x
	elif z <= 5.5e+62:
		tmp = y * z
	elif z <= 1.1e+205:
		tmp = z * (a * b)
	elif z <= 2.4e+217:
		tmp = y * z
	else:
		tmp = a * (z * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -2300000.0)
		tmp = Float64(y * z);
	elseif (z <= -1.02e-141)
		tmp = x;
	elseif (z <= -1.15e-181)
		tmp = Float64(t * a);
	elseif (z <= 4.6e-279)
		tmp = x;
	elseif (z <= 5.6e-21)
		tmp = Float64(t * a);
	elseif (z <= 3.6e+43)
		tmp = x;
	elseif (z <= 5.5e+62)
		tmp = Float64(y * z);
	elseif (z <= 1.1e+205)
		tmp = Float64(z * Float64(a * b));
	elseif (z <= 2.4e+217)
		tmp = Float64(y * z);
	else
		tmp = Float64(a * Float64(z * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -2300000.0)
		tmp = y * z;
	elseif (z <= -1.02e-141)
		tmp = x;
	elseif (z <= -1.15e-181)
		tmp = t * a;
	elseif (z <= 4.6e-279)
		tmp = x;
	elseif (z <= 5.6e-21)
		tmp = t * a;
	elseif (z <= 3.6e+43)
		tmp = x;
	elseif (z <= 5.5e+62)
		tmp = y * z;
	elseif (z <= 1.1e+205)
		tmp = z * (a * b);
	elseif (z <= 2.4e+217)
		tmp = y * z;
	else
		tmp = a * (z * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2300000.0], N[(y * z), $MachinePrecision], If[LessEqual[z, -1.02e-141], x, If[LessEqual[z, -1.15e-181], N[(t * a), $MachinePrecision], If[LessEqual[z, 4.6e-279], x, If[LessEqual[z, 5.6e-21], N[(t * a), $MachinePrecision], If[LessEqual[z, 3.6e+43], x, If[LessEqual[z, 5.5e+62], N[(y * z), $MachinePrecision], If[LessEqual[z, 1.1e+205], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+217], N[(y * z), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2300000:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;z \leq -1.02 \cdot 10^{-141}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-181}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-279}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.6 \cdot 10^{-21}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+43}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+62}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+205}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+217}:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.3e6 or 3.6000000000000001e43 < z < 5.4999999999999997e62 or 1.0999999999999999e205 < z < 2.3999999999999998e217

    1. Initial program 91.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+91.7%

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

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

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

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

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

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

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

    if -2.3e6 < z < -1.02e-141 or -1.14999999999999995e-181 < z < 4.5999999999999999e-279 or 5.60000000000000008e-21 < z < 3.6000000000000001e43

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

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

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

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

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

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

    if -1.02e-141 < z < -1.14999999999999995e-181 or 4.5999999999999999e-279 < z < 5.60000000000000008e-21

    1. Initial program 97.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+97.1%

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr89.2%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in t around inf 54.0%

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

    if 5.4999999999999997e62 < z < 1.0999999999999999e205

    1. Initial program 92.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+92.2%

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative95.1%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr95.1%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in z around inf 31.4%

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(b \cdot a\right)} \]
      4. *-commutative39.5%

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

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

    if 2.3999999999999998e217 < z

    1. Initial program 50.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+50.4%

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative56.1%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr56.1%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in z around inf 88.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2300000:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-181}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-21}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+62}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+205}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+217}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]

Alternative 4: 95.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.08e63 or 9.00000000000000068e127 < a

    1. Initial program 74.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+74.8%

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

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

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

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

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

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

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

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

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

    if -1.08e63 < a < 9.00000000000000068e127

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

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

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

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

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

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

Alternative 5: 57.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 1.08 \cdot 10^{-17}:\\
\;\;\;\;x + y \cdot z\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+97} \lor \neg \left(a \leq 1.35 \cdot 10^{+239}\right) \land a \leq 4.3 \cdot 10^{+306}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.15e18 or 2.49999999999999999e97 < a < 1.3499999999999999e239 or 4.2999999999999998e306 < a

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative72.7%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr72.7%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in t around inf 52.1%

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

    if -2.15e18 < a < 1.07999999999999995e-17

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

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

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

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

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

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

    if 1.07999999999999995e-17 < a < 2.49999999999999999e97 or 1.3499999999999999e239 < a < 4.2999999999999998e306

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative86.0%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr86.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{+18}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-17}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+97} \lor \neg \left(a \leq 1.35 \cdot 10^{+239}\right) \land a \leq 4.3 \cdot 10^{+306}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]

Alternative 6: 87.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq -4.4 \cdot 10^{-36}:\\
\;\;\;\;t_1 + y \cdot z\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-19}:\\
\;\;\;\;\left(x + y \cdot z\right) + t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.70000000000000007e181 or 3.50000000000000015e-19 < a

    1. Initial program 84.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+84.8%

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000007e181 < a < -4.3999999999999999e-36

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

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

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

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

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

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

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

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

    if -4.3999999999999999e-36 < a < 3.50000000000000015e-19

    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. *-commutative99.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+181}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-36}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right) + y \cdot z\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-19}:\\ \;\;\;\;\left(x + y \cdot z\right) + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]

Alternative 7: 39.2% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;z \leq -3 \cdot 10^{-136}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3.65 \cdot 10^{-183}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-279}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6600000000:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1e5 or 6.6e9 < 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. *-commutative86.4%

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

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

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

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

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

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

    if -1e5 < z < -2.9999999999999998e-136 or -3.64999999999999999e-183 < z < 2.6000000000000002e-279

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

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

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

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

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

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

    if -2.9999999999999998e-136 < z < -3.64999999999999999e-183 or 2.6000000000000002e-279 < z < 6.6e9

    1. Initial program 97.3%

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative89.9%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr89.9%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in t around inf 51.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -100000:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-136}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.65 \cdot 10^{-183}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6600000000:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]

Alternative 8: 82.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+49} \lor \neg \left(z \leq 8.5 \cdot 10^{+18}\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 -4.4e+49) (not (<= z 8.5e+18)))
   (* 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 <= -4.4e+49) || !(z <= 8.5e+18)) {
		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 <= (-4.4d+49)) .or. (.not. (z <= 8.5d+18))) 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 <= -4.4e+49) || !(z <= 8.5e+18)) {
		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 <= -4.4e+49) or not (z <= 8.5e+18):
		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 <= -4.4e+49) || !(z <= 8.5e+18))
		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 <= -4.4e+49) || ~((z <= 8.5e+18)))
		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, -4.4e+49], N[Not[LessEqual[z, 8.5e+18]], $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 -4.4 \cdot 10^{+49} \lor \neg \left(z \leq 8.5 \cdot 10^{+18}\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 < -4.4000000000000001e49 or 8.5e18 < z

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

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

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

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

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

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

    if -4.4000000000000001e49 < z < 8.5e18

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

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

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

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

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

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

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

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

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

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

Alternative 9: 87.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -240000000000 \lor \neg \left(z \leq 1.15 \cdot 10^{-7}\right):\\ \;\;\;\;x + 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 -240000000000.0) (not (<= z 1.15e-7)))
   (+ x (* 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 <= -240000000000.0) || !(z <= 1.15e-7)) {
		tmp = x + (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 <= (-240000000000.0d0)) .or. (.not. (z <= 1.15d-7))) then
        tmp = x + (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 <= -240000000000.0) || !(z <= 1.15e-7)) {
		tmp = x + (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 <= -240000000000.0) or not (z <= 1.15e-7):
		tmp = x + (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 <= -240000000000.0) || !(z <= 1.15e-7))
		tmp = Float64(x + 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 <= -240000000000.0) || ~((z <= 1.15e-7)))
		tmp = x + (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, -240000000000.0], N[Not[LessEqual[z, 1.15e-7]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $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 -240000000000 \lor \neg \left(z \leq 1.15 \cdot 10^{-7}\right):\\
\;\;\;\;x + 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 < -2.4e11 or 1.14999999999999997e-7 < z

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e11 < z < 1.14999999999999997e-7

    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. +-commutative97.8%

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

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

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

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

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

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

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

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

Alternative 10: 80.5% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.08000000000000008e54

    1. Initial program 91.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+91.8%

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(a \cdot b + y\right)} \]
      2. distribute-lft-in84.3%

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

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

        \[\leadsto \color{blue}{\left(z \cdot b\right) \cdot a} + z \cdot y \]
    6. Applied egg-rr76.4%

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

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

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

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

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

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

    if -1.08000000000000008e54 < z < 3e18

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

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

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

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

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

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

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

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

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

    if 3e18 < z

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

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

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

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

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

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

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

Alternative 11: 62.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+15}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.6:\\
\;\;\;\;x + t \cdot a\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2e15 or 5.5999999999999996 < z < 2.79999999999999994e217

    1. Initial program 92.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+92.3%

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

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

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

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

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

    if -2.2e15 < z < 5.5999999999999996

    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. *-commutative97.8%

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

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

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

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

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

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

    if 2.79999999999999994e217 < z

    1. Initial program 50.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+50.4%

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative56.1%

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(z, y, x\right)}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    5. Applied egg-rr56.1%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in z around inf 88.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+15}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;z \leq 5.6:\\ \;\;\;\;x + t \cdot a\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+217}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]

Alternative 12: 74.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{-28} \lor \neg \left(a \leq 1.7 \cdot 10^{-25}\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 -3e-28) (not (<= a 1.7e-25)))
   (* 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 <= -3e-28) || !(a <= 1.7e-25)) {
		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 <= (-3d-28)) .or. (.not. (a <= 1.7d-25))) 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 <= -3e-28) || !(a <= 1.7e-25)) {
		tmp = a * (t + (z * b));
	} else {
		tmp = x + (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -3e-28) or not (a <= 1.7e-25):
		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 <= -3e-28) || !(a <= 1.7e-25))
		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 <= -3e-28) || ~((a <= 1.7e-25)))
		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, -3e-28], N[Not[LessEqual[a, 1.7e-25]], $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 -3 \cdot 10^{-28} \lor \neg \left(a \leq 1.7 \cdot 10^{-25}\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 < -3.00000000000000003e-28 or 1.70000000000000001e-25 < a

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative80.5%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in z around inf 72.4%

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

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      2. *-commutative78.6%

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

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

    if -3.00000000000000003e-28 < a < 1.70000000000000001e-25

    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. *-commutative99.2%

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

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

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

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

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

Alternative 13: 74.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+14} \lor \neg \left(z \leq 1800000000000\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.45e14 or 1.8e12 < z

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

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

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

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

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

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

    if -2.45e14 < z < 1.8e12

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

Alternative 14: 38.9% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-45} \lor \neg \left(t \leq 2.75 \cdot 10^{+26}\right):\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.79999999999999997e-45 or 2.7499999999999998e26 < t

    1. Initial program 91.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+91.0%

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{y \cdot z + x}}\right)}^{3} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
      4. *-commutative86.5%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(z, y, x\right)}\right)}^{3}} + \left(t \cdot a + z \cdot \left(a \cdot b\right)\right) \]
    6. Taylor expanded in t around inf 45.6%

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

    if -3.79999999999999997e-45 < t < 2.7499999999999998e26

    1. Initial program 94.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+94.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{-45} \lor \neg \left(t \leq 2.75 \cdot 10^{+26}\right):\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 26.8% 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 92.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+92.7%

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification26.6%

    \[\leadsto x \]

Developer target: 97.4% 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 2023305 
(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)))