Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.8% → 95.5%
Time: 6.9s
Alternatives: 12
Speedup: 1.4×

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 12 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.8% 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: 95.5% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\


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

    1. Initial program 90.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b} \]
      2. lift-+.f64N/A

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

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      4. +-commutativeN/A

        \[\leadsto \color{blue}{\left(t \cdot a + \left(a \cdot z\right) \cdot b\right) + \left(x + y \cdot z\right)} \]
      5. lift-*.f64N/A

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

        \[\leadsto \left(\color{blue}{a \cdot t} + \left(a \cdot z\right) \cdot b\right) + \left(x + y \cdot z\right) \]
      7. lift-*.f64N/A

        \[\leadsto \left(a \cdot t + \color{blue}{\left(a \cdot z\right) \cdot b}\right) + \left(x + y \cdot z\right) \]
      8. lift-*.f64N/A

        \[\leadsto \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right) + \left(x + y \cdot z\right) \]
      9. associate-*l*N/A

        \[\leadsto \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right) + \left(x + y \cdot z\right) \]
      10. distribute-lft-outN/A

        \[\leadsto \color{blue}{a \cdot \left(t + z \cdot b\right)} + \left(x + y \cdot z\right) \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, t + z \cdot b, x + y \cdot z\right)} \]
      12. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{t + z \cdot b}, x + y \cdot z\right) \]
      13. *-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(a, t + \color{blue}{b \cdot z}, x + y \cdot z\right) \]
      15. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{x + y \cdot z}\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{y \cdot z + x}\right) \]
      17. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{y \cdot z} + x\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{z \cdot y} + x\right) \]
      19. lower-fma.f6496.8

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

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

    if 2.8000000000000001e79 < z

    1. Initial program 81.4%

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
      8. *-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
    5. Applied rewrites99.9%

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

Alternative 2: 74.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, a, y\right) \cdot z\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -850000000:\\ \;\;\;\;\mathsf{fma}\left(z \cdot b, a, x\right)\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-55}:\\ \;\;\;\;\mathsf{fma}\left(a, t, z \cdot y\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-68}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (fma b a y) z)))
   (if (<= z -7.8e+115)
     t_1
     (if (<= z -850000000.0)
       (fma (* z b) a x)
       (if (<= z -1.35e-55)
         (fma a t (* z y))
         (if (<= z 6.4e-68) (fma a t x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(b, a, y) * z;
	double tmp;
	if (z <= -7.8e+115) {
		tmp = t_1;
	} else if (z <= -850000000.0) {
		tmp = fma((z * b), a, x);
	} else if (z <= -1.35e-55) {
		tmp = fma(a, t, (z * y));
	} else if (z <= 6.4e-68) {
		tmp = fma(a, t, x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(fma(b, a, y) * z)
	tmp = 0.0
	if (z <= -7.8e+115)
		tmp = t_1;
	elseif (z <= -850000000.0)
		tmp = fma(Float64(z * b), a, x);
	elseif (z <= -1.35e-55)
		tmp = fma(a, t, Float64(z * y));
	elseif (z <= 6.4e-68)
		tmp = fma(a, t, x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * a + y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.8e+115], t$95$1, If[LessEqual[z, -850000000.0], N[(N[(z * b), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, -1.35e-55], N[(a * t + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-68], N[(a * t + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -850000000:\\
\;\;\;\;\mathsf{fma}\left(z \cdot b, a, x\right)\\

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-55}:\\
\;\;\;\;\mathsf{fma}\left(a, t, z \cdot y\right)\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(a, t, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.80000000000000012e115 or 6.3999999999999998e-68 < z

    1. Initial program 82.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{\left(a \cdot b + y\right)} \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(\color{blue}{b \cdot a} + y\right) \cdot z \]
      5. lower-fma.f6479.8

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \cdot z \]
    5. Applied rewrites79.8%

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

    if -7.80000000000000012e115 < z < -8.5e8

    1. Initial program 87.1%

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

      \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto x + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right) + x} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(t + b \cdot z\right) \cdot a} + x \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t + b \cdot z, a, x\right)} \]
      5. +-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, z, t\right)}, a, x\right) \]
    5. Applied rewrites79.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)} \]
    6. Taylor expanded in z around inf

      \[\leadsto \mathsf{fma}\left(b \cdot z, a, x\right) \]
    7. Step-by-step derivation
      1. Applied rewrites70.5%

        \[\leadsto \mathsf{fma}\left(z \cdot b, a, x\right) \]

      if -8.5e8 < z < -1.35000000000000002e-55

      1. Initial program 100.0%

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

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

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

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

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

          \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
        5. *-commutativeN/A

          \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
        6. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
        7. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
        8. *-commutativeN/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
      5. Applied rewrites60.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
      6. Taylor expanded in b around 0

        \[\leadsto \color{blue}{x + \left(a \cdot t + y \cdot z\right)} \]
      7. Step-by-step derivation
        1. associate-+r+N/A

          \[\leadsto \color{blue}{\left(x + a \cdot t\right) + y \cdot z} \]
        2. +-commutativeN/A

          \[\leadsto \color{blue}{\left(a \cdot t + x\right)} + y \cdot z \]
        3. associate-+l+N/A

          \[\leadsto \color{blue}{a \cdot t + \left(x + y \cdot z\right)} \]
        4. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x + y \cdot z\right)} \]
        5. +-commutativeN/A

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

          \[\leadsto \mathsf{fma}\left(a, t, \color{blue}{z \cdot y} + x\right) \]
        7. lower-fma.f6490.1

          \[\leadsto \mathsf{fma}\left(a, t, \color{blue}{\mathsf{fma}\left(z, y, x\right)}\right) \]
      8. Applied rewrites90.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)} \]
      9. Taylor expanded in x around 0

        \[\leadsto \mathsf{fma}\left(a, t, y \cdot z\right) \]
      10. Step-by-step derivation
        1. Applied rewrites89.3%

          \[\leadsto \mathsf{fma}\left(a, t, z \cdot y\right) \]

        if -1.35000000000000002e-55 < z < 6.3999999999999998e-68

        1. Initial program 97.4%

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

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

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

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

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

            \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
          5. *-commutativeN/A

            \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
          7. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
          8. *-commutativeN/A

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
        5. Applied rewrites56.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
        6. Taylor expanded in z around 0

          \[\leadsto \color{blue}{x + a \cdot t} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{a \cdot t + x} \]
          2. lower-fma.f6481.7

            \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
        8. Applied rewrites81.7%

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
      11. Recombined 4 regimes into one program.
      12. Add Preprocessing

      Alternative 3: 81.6% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, a, y\right) \cdot z\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot b, a, x\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+65}:\\ \;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* (fma b a y) z)))
         (if (<= z -7.8e+115)
           t_1
           (if (<= z -3.3e+15)
             (fma (* z b) a x)
             (if (<= z 8e+65) (fma a t (fma z y x)) t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = fma(b, a, y) * z;
      	double tmp;
      	if (z <= -7.8e+115) {
      		tmp = t_1;
      	} else if (z <= -3.3e+15) {
      		tmp = fma((z * b), a, x);
      	} else if (z <= 8e+65) {
      		tmp = fma(a, t, fma(z, y, x));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(fma(b, a, y) * z)
      	tmp = 0.0
      	if (z <= -7.8e+115)
      		tmp = t_1;
      	elseif (z <= -3.3e+15)
      		tmp = fma(Float64(z * b), a, x);
      	elseif (z <= 8e+65)
      		tmp = fma(a, t, fma(z, y, x));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * a + y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.8e+115], t$95$1, If[LessEqual[z, -3.3e+15], N[(N[(z * b), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 8e+65], N[(a * t + N[(z * y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(b, a, y\right) \cdot z\\
      \mathbf{if}\;z \leq -7.8 \cdot 10^{+115}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq -3.3 \cdot 10^{+15}:\\
      \;\;\;\;\mathsf{fma}\left(z \cdot b, a, x\right)\\
      
      \mathbf{elif}\;z \leq 8 \cdot 10^{+65}:\\
      \;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -7.80000000000000012e115 or 7.9999999999999999e65 < z

        1. Initial program 79.2%

          \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
          3. +-commutativeN/A

            \[\leadsto \color{blue}{\left(a \cdot b + y\right)} \cdot z \]
          4. *-commutativeN/A

            \[\leadsto \left(\color{blue}{b \cdot a} + y\right) \cdot z \]
          5. lower-fma.f6487.9

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \cdot z \]
        5. Applied rewrites87.9%

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

        if -7.80000000000000012e115 < z < -3.3e15

        1. Initial program 85.2%

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

          \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
        4. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto x + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right) + x} \]
          3. *-commutativeN/A

            \[\leadsto \color{blue}{\left(t + b \cdot z\right) \cdot a} + x \]
          4. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(t + b \cdot z, a, x\right)} \]
          5. +-commutativeN/A

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, z, t\right)}, a, x\right) \]
        5. Applied rewrites84.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)} \]
        6. Taylor expanded in z around inf

          \[\leadsto \mathsf{fma}\left(b \cdot z, a, x\right) \]
        7. Step-by-step derivation
          1. Applied rewrites73.3%

            \[\leadsto \mathsf{fma}\left(z \cdot b, a, x\right) \]

          if -3.3e15 < z < 7.9999999999999999e65

          1. Initial program 96.7%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites63.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
          6. Taylor expanded in b around 0

            \[\leadsto \color{blue}{x + \left(a \cdot t + y \cdot z\right)} \]
          7. Step-by-step derivation
            1. associate-+r+N/A

              \[\leadsto \color{blue}{\left(x + a \cdot t\right) + y \cdot z} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{\left(a \cdot t + x\right)} + y \cdot z \]
            3. associate-+l+N/A

              \[\leadsto \color{blue}{a \cdot t + \left(x + y \cdot z\right)} \]
            4. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x + y \cdot z\right)} \]
            5. +-commutativeN/A

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

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

              \[\leadsto \mathsf{fma}\left(a, t, \color{blue}{\mathsf{fma}\left(z, y, x\right)}\right) \]
          8. Applied rewrites89.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)} \]
        8. Recombined 3 regimes into one program.
        9. Add Preprocessing

        Alternative 4: 88.2% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -116000000 \lor \neg \left(z \leq 90\right):\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -116000000.0) (not (<= z 90.0)))
           (fma (fma b a y) z x)
           (fma a t (fma z y x))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -116000000.0) || !(z <= 90.0)) {
        		tmp = fma(fma(b, a, y), z, x);
        	} else {
        		tmp = fma(a, t, fma(z, y, x));
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -116000000.0) || !(z <= 90.0))
        		tmp = fma(fma(b, a, y), z, x);
        	else
        		tmp = fma(a, t, fma(z, y, x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -116000000.0], N[Not[LessEqual[z, 90.0]], $MachinePrecision]], N[(N[(b * a + y), $MachinePrecision] * z + x), $MachinePrecision], N[(a * t + N[(z * y + x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -116000000 \lor \neg \left(z \leq 90\right):\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.16e8 or 90 < z

          1. Initial program 81.4%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites92.8%

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

          if -1.16e8 < z < 90

          1. Initial program 98.0%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites59.2%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
          6. Taylor expanded in b around 0

            \[\leadsto \color{blue}{x + \left(a \cdot t + y \cdot z\right)} \]
          7. Step-by-step derivation
            1. associate-+r+N/A

              \[\leadsto \color{blue}{\left(x + a \cdot t\right) + y \cdot z} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{\left(a \cdot t + x\right)} + y \cdot z \]
            3. associate-+l+N/A

              \[\leadsto \color{blue}{a \cdot t + \left(x + y \cdot z\right)} \]
            4. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x + y \cdot z\right)} \]
            5. +-commutativeN/A

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

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

              \[\leadsto \mathsf{fma}\left(a, t, \color{blue}{\mathsf{fma}\left(z, y, x\right)}\right) \]
          8. Applied rewrites91.6%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -116000000 \lor \neg \left(z \leq 90\right):\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 5: 74.9% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-55} \lor \neg \left(z \leq 6.4 \cdot 10^{-68}\right):\\ \;\;\;\;\mathsf{fma}\left(b, a, y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -1.35e-55) (not (<= z 6.4e-68))) (* (fma b a y) z) (fma a t x)))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -1.35e-55) || !(z <= 6.4e-68)) {
        		tmp = fma(b, a, y) * z;
        	} else {
        		tmp = fma(a, t, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -1.35e-55) || !(z <= 6.4e-68))
        		tmp = Float64(fma(b, a, y) * z);
        	else
        		tmp = fma(a, t, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.35e-55], N[Not[LessEqual[z, 6.4e-68]], $MachinePrecision]], N[(N[(b * a + y), $MachinePrecision] * z), $MachinePrecision], N[(a * t + x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.35 \cdot 10^{-55} \lor \neg \left(z \leq 6.4 \cdot 10^{-68}\right):\\
        \;\;\;\;\mathsf{fma}\left(b, a, y\right) \cdot z\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.35000000000000002e-55 or 6.3999999999999998e-68 < z

          1. Initial program 84.4%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
            3. +-commutativeN/A

              \[\leadsto \color{blue}{\left(a \cdot b + y\right)} \cdot z \]
            4. *-commutativeN/A

              \[\leadsto \left(\color{blue}{b \cdot a} + y\right) \cdot z \]
            5. lower-fma.f6473.7

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \cdot z \]
          5. Applied rewrites73.7%

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

          if -1.35000000000000002e-55 < z < 6.3999999999999998e-68

          1. Initial program 97.4%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites56.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
          6. Taylor expanded in z around 0

            \[\leadsto \color{blue}{x + a \cdot t} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{a \cdot t + x} \]
            2. lower-fma.f6481.7

              \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
          8. Applied rewrites81.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification76.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-55} \lor \neg \left(z \leq 6.4 \cdot 10^{-68}\right):\\ \;\;\;\;\mathsf{fma}\left(b, a, y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 95.7% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \mathsf{fma}\left(z, y, x + a \cdot \mathsf{fma}\left(b, z, t\right)\right) \end{array} \]
        (FPCore (x y z t a b) :precision binary64 (fma z y (+ x (* a (fma b z t)))))
        double code(double x, double y, double z, double t, double a, double b) {
        	return fma(z, y, (x + (a * fma(b, z, t))));
        }
        
        function code(x, y, z, t, a, b)
        	return fma(z, y, Float64(x + Float64(a * fma(b, z, t))))
        end
        
        code[x_, y_, z_, t_, a_, b_] := N[(z * y + N[(x + N[(a * N[(b * z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \mathsf{fma}\left(z, y, x + a \cdot \mathsf{fma}\left(b, z, t\right)\right)
        \end{array}
        
        Derivation
        1. Initial program 89.0%

          \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b} \]
          2. lift-+.f64N/A

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

            \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
          4. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(x + y \cdot z\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
          5. +-commutativeN/A

            \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
          6. associate-+l+N/A

            \[\leadsto \color{blue}{y \cdot z + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
          7. lift-*.f64N/A

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

            \[\leadsto \color{blue}{z \cdot y} + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right) \]
          9. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
          10. lower-+.f64N/A

            \[\leadsto \mathsf{fma}\left(z, y, \color{blue}{x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)}\right) \]
          11. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{\left(\left(a \cdot z\right) \cdot b + t \cdot a\right)}\right) \]
          12. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{\left(a \cdot z\right) \cdot b} + t \cdot a\right)\right) \]
          13. lift-*.f64N/A

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

            \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{a \cdot \left(z \cdot b\right)} + t \cdot a\right)\right) \]
          15. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{t \cdot a}\right)\right) \]
          16. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{a \cdot t}\right)\right) \]
          17. distribute-lft-outN/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
          18. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
          19. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(\color{blue}{b \cdot z} + t\right)\right) \]
          20. lower-fma.f6497.0

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

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

        Alternative 7: 63.1% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+99} \lor \neg \left(a \leq 2.2 \cdot 10^{+63}\right):\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= a -8.5e+99) (not (<= a 2.2e+63))) (fma a t x) (fma z y x)))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((a <= -8.5e+99) || !(a <= 2.2e+63)) {
        		tmp = fma(a, t, x);
        	} else {
        		tmp = fma(z, y, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((a <= -8.5e+99) || !(a <= 2.2e+63))
        		tmp = fma(a, t, x);
        	else
        		tmp = fma(z, y, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.5e+99], N[Not[LessEqual[a, 2.2e+63]], $MachinePrecision]], N[(a * t + x), $MachinePrecision], N[(z * y + x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -8.5 \cdot 10^{+99} \lor \neg \left(a \leq 2.2 \cdot 10^{+63}\right):\\
        \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -8.49999999999999984e99 or 2.1999999999999999e63 < a

          1. Initial program 73.7%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites60.2%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
          6. Taylor expanded in z around 0

            \[\leadsto \color{blue}{x + a \cdot t} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{a \cdot t + x} \]
            2. lower-fma.f6456.4

              \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
          8. Applied rewrites56.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]

          if -8.49999999999999984e99 < a < 2.1999999999999999e63

          1. Initial program 98.5%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites88.2%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
          6. Taylor expanded in a around 0

            \[\leadsto \color{blue}{x + y \cdot z} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{y \cdot z + x} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{z \cdot y} + x \]
            3. lower-fma.f6469.0

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x\right)} \]
          8. Applied rewrites69.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification64.2%

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

        Alternative 8: 60.0% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+115} \lor \neg \left(z \leq 5.1 \cdot 10^{+83}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (or (<= z -9.8e+115) (not (<= z 5.1e+83))) (* y z) (fma a t x)))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((z <= -9.8e+115) || !(z <= 5.1e+83)) {
        		tmp = y * z;
        	} else {
        		tmp = fma(a, t, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if ((z <= -9.8e+115) || !(z <= 5.1e+83))
        		tmp = Float64(y * z);
        	else
        		tmp = fma(a, t, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.8e+115], N[Not[LessEqual[z, 5.1e+83]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(a * t + x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -9.8 \cdot 10^{+115} \lor \neg \left(z \leq 5.1 \cdot 10^{+83}\right):\\
        \;\;\;\;y \cdot z\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -9.79999999999999928e115 or 5.0999999999999997e83 < z

          1. Initial program 78.3%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \color{blue}{\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b} \]
            2. lift-+.f64N/A

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

              \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
            4. lift-+.f64N/A

              \[\leadsto \color{blue}{\left(x + y \cdot z\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
            5. +-commutativeN/A

              \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
            6. associate-+l+N/A

              \[\leadsto \color{blue}{y \cdot z + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
            7. lift-*.f64N/A

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

              \[\leadsto \color{blue}{z \cdot y} + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right) \]
            9. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
            10. lower-+.f64N/A

              \[\leadsto \mathsf{fma}\left(z, y, \color{blue}{x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)}\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{\left(\left(a \cdot z\right) \cdot b + t \cdot a\right)}\right) \]
            12. lift-*.f64N/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{\left(a \cdot z\right) \cdot b} + t \cdot a\right)\right) \]
            13. lift-*.f64N/A

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

              \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{a \cdot \left(z \cdot b\right)} + t \cdot a\right)\right) \]
            15. lift-*.f64N/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{t \cdot a}\right)\right) \]
            16. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{a \cdot t}\right)\right) \]
            17. distribute-lft-outN/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
            18. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
            19. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(\color{blue}{b \cdot z} + t\right)\right) \]
            20. lower-fma.f6493.8

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

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

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

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

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

          if -9.79999999999999928e115 < z < 5.0999999999999997e83

          1. Initial program 94.9%

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

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

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

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

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

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
            8. *-commutativeN/A

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
          5. Applied rewrites68.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
          6. Taylor expanded in z around 0

            \[\leadsto \color{blue}{x + a \cdot t} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{a \cdot t + x} \]
            2. lower-fma.f6465.8

              \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
          8. Applied rewrites65.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification57.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+115} \lor \neg \left(z \leq 5.1 \cdot 10^{+83}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 61.1% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+110}:\\ \;\;\;\;\left(z \cdot b\right) \cdot a\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (<= a -1.5e+110)
           (* (* z b) a)
           (if (<= a 2.2e+63) (fma z y x) (fma a t x))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (a <= -1.5e+110) {
        		tmp = (z * b) * a;
        	} else if (a <= 2.2e+63) {
        		tmp = fma(z, y, x);
        	} else {
        		tmp = fma(a, t, x);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (a <= -1.5e+110)
        		tmp = Float64(Float64(z * b) * a);
        	elseif (a <= 2.2e+63)
        		tmp = fma(z, y, x);
        	else
        		tmp = fma(a, t, x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.5e+110], N[(N[(z * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, 2.2e+63], N[(z * y + x), $MachinePrecision], N[(a * t + x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -1.5 \cdot 10^{+110}:\\
        \;\;\;\;\left(z \cdot b\right) \cdot a\\
        
        \mathbf{elif}\;a \leq 2.2 \cdot 10^{+63}:\\
        \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if a < -1.50000000000000004e110

          1. Initial program 60.8%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Add Preprocessing
          3. Taylor expanded in a around inf

            \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(t + b \cdot z\right) \cdot a} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(t + b \cdot z\right) \cdot a} \]
            3. +-commutativeN/A

              \[\leadsto \color{blue}{\left(b \cdot z + t\right)} \cdot a \]
            4. lower-fma.f6494.7

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, z, t\right)} \cdot a \]
          5. Applied rewrites94.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, z, t\right) \cdot a} \]
          6. Taylor expanded in z around inf

            \[\leadsto \left(b \cdot z\right) \cdot a \]
          7. Step-by-step derivation
            1. Applied rewrites54.5%

              \[\leadsto \left(z \cdot b\right) \cdot a \]

            if -1.50000000000000004e110 < a < 2.1999999999999999e63

            1. Initial program 98.5%

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

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

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

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

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

                \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
              5. *-commutativeN/A

                \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
              6. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
              7. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
              8. *-commutativeN/A

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
            5. Applied rewrites87.8%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
            6. Taylor expanded in a around 0

              \[\leadsto \color{blue}{x + y \cdot z} \]
            7. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{y \cdot z + x} \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{z \cdot y} + x \]
              3. lower-fma.f6469.0

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x\right)} \]
            8. Applied rewrites69.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x\right)} \]

            if 2.1999999999999999e63 < a

            1. Initial program 79.9%

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

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

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

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

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

                \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
              5. *-commutativeN/A

                \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
              6. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
              7. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
              8. *-commutativeN/A

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
            5. Applied rewrites64.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
            6. Taylor expanded in z around 0

              \[\leadsto \color{blue}{x + a \cdot t} \]
            7. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{a \cdot t + x} \]
              2. lower-fma.f6459.5

                \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
            8. Applied rewrites59.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 10: 61.1% accurate, 1.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+110}:\\ \;\;\;\;\left(b \cdot a\right) \cdot z\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= a -1.5e+110)
             (* (* b a) z)
             (if (<= a 2.2e+63) (fma z y x) (fma a t x))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (a <= -1.5e+110) {
          		tmp = (b * a) * z;
          	} else if (a <= 2.2e+63) {
          		tmp = fma(z, y, x);
          	} else {
          		tmp = fma(a, t, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (a <= -1.5e+110)
          		tmp = Float64(Float64(b * a) * z);
          	elseif (a <= 2.2e+63)
          		tmp = fma(z, y, x);
          	else
          		tmp = fma(a, t, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.5e+110], N[(N[(b * a), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 2.2e+63], N[(z * y + x), $MachinePrecision], N[(a * t + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -1.5 \cdot 10^{+110}:\\
          \;\;\;\;\left(b \cdot a\right) \cdot z\\
          
          \mathbf{elif}\;a \leq 2.2 \cdot 10^{+63}:\\
          \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if a < -1.50000000000000004e110

            1. Initial program 60.8%

              \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} \]
              3. +-commutativeN/A

                \[\leadsto \color{blue}{\left(a \cdot b + y\right)} \cdot z \]
              4. *-commutativeN/A

                \[\leadsto \left(\color{blue}{b \cdot a} + y\right) \cdot z \]
              5. lower-fma.f6451.0

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right)} \cdot z \]
            5. Applied rewrites51.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, y\right) \cdot z} \]
            6. Taylor expanded in y around 0

              \[\leadsto \left(a \cdot b\right) \cdot z \]
            7. Step-by-step derivation
              1. Applied rewrites50.3%

                \[\leadsto \left(b \cdot a\right) \cdot z \]

              if -1.50000000000000004e110 < a < 2.1999999999999999e63

              1. Initial program 98.5%

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

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

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

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

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

                  \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
                5. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
                6. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
                7. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
                8. *-commutativeN/A

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
              5. Applied rewrites87.8%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
              6. Taylor expanded in a around 0

                \[\leadsto \color{blue}{x + y \cdot z} \]
              7. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{y \cdot z + x} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{z \cdot y} + x \]
                3. lower-fma.f6469.0

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x\right)} \]
              8. Applied rewrites69.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x\right)} \]

              if 2.1999999999999999e63 < a

              1. Initial program 79.9%

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

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

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

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

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

                  \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
                5. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(y + a \cdot b\right) \cdot z} + x \]
                6. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y + a \cdot b, z, x\right)} \]
                7. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b + y}, z, x\right) \]
                8. *-commutativeN/A

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
              5. Applied rewrites64.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{x + a \cdot t} \]
              7. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{a \cdot t + x} \]
                2. lower-fma.f6459.5

                  \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
              8. Applied rewrites59.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(a, t, x\right)} \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 11: 38.2% accurate, 1.7× speedup?

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

              1. Initial program 73.7%

                \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
              2. Add Preprocessing
              3. Taylor expanded in t around inf

                \[\leadsto \color{blue}{a \cdot t} \]
              4. Step-by-step derivation
                1. lower-*.f6443.5

                  \[\leadsto \color{blue}{a \cdot t} \]
              5. Applied rewrites43.5%

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

              if -8.49999999999999984e99 < a < 2.29999999999999993e63

              1. Initial program 98.5%

                \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-+.f64N/A

                  \[\leadsto \color{blue}{\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b} \]
                2. lift-+.f64N/A

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

                  \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
                4. lift-+.f64N/A

                  \[\leadsto \color{blue}{\left(x + y \cdot z\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
                5. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
                6. associate-+l+N/A

                  \[\leadsto \color{blue}{y \cdot z + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
                7. lift-*.f64N/A

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

                  \[\leadsto \color{blue}{z \cdot y} + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right) \]
                9. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
                10. lower-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, y, \color{blue}{x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)}\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{\left(\left(a \cdot z\right) \cdot b + t \cdot a\right)}\right) \]
                12. lift-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{\left(a \cdot z\right) \cdot b} + t \cdot a\right)\right) \]
                13. lift-*.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{a \cdot \left(z \cdot b\right)} + t \cdot a\right)\right) \]
                15. lift-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{t \cdot a}\right)\right) \]
                16. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{a \cdot t}\right)\right) \]
                17. distribute-lft-outN/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
                18. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
                19. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(\color{blue}{b \cdot z} + t\right)\right) \]
                20. lower-fma.f6495.2

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

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

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

                  \[\leadsto \color{blue}{y \cdot z} \]
              7. Applied rewrites37.1%

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

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

            Alternative 12: 27.4% accurate, 5.0× speedup?

            \[\begin{array}{l} \\ y \cdot z \end{array} \]
            (FPCore (x y z t a b) :precision binary64 (* y z))
            double code(double x, double y, double z, double t, double a, double b) {
            	return y * z;
            }
            
            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 = y * z
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	return y * z;
            }
            
            def code(x, y, z, t, a, b):
            	return y * z
            
            function code(x, y, z, t, a, b)
            	return Float64(y * z)
            end
            
            function tmp = code(x, y, z, t, a, b)
            	tmp = y * z;
            end
            
            code[x_, y_, z_, t_, a_, b_] := N[(y * z), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            y \cdot z
            \end{array}
            
            Derivation
            1. Initial program 89.0%

              \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b} \]
              2. lift-+.f64N/A

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

                \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
              4. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(x + y \cdot z\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
              5. +-commutativeN/A

                \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
              6. associate-+l+N/A

                \[\leadsto \color{blue}{y \cdot z + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
              7. lift-*.f64N/A

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

                \[\leadsto \color{blue}{z \cdot y} + \left(x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right) \]
              9. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)\right)} \]
              10. lower-+.f64N/A

                \[\leadsto \mathsf{fma}\left(z, y, \color{blue}{x + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)}\right) \]
              11. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{\left(\left(a \cdot z\right) \cdot b + t \cdot a\right)}\right) \]
              12. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{\left(a \cdot z\right) \cdot b} + t \cdot a\right)\right) \]
              13. lift-*.f64N/A

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

                \[\leadsto \mathsf{fma}\left(z, y, x + \left(\color{blue}{a \cdot \left(z \cdot b\right)} + t \cdot a\right)\right) \]
              15. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{t \cdot a}\right)\right) \]
              16. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot \left(z \cdot b\right) + \color{blue}{a \cdot t}\right)\right) \]
              17. distribute-lft-outN/A

                \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
              18. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(z, y, x + \color{blue}{a \cdot \left(z \cdot b + t\right)}\right) \]
              19. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(\color{blue}{b \cdot z} + t\right)\right) \]
              20. lower-fma.f6497.0

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

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

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

                \[\leadsto \color{blue}{y \cdot z} \]
            7. Applied rewrites27.1%

              \[\leadsto \color{blue}{y \cdot z} \]
            8. Final simplification27.1%

              \[\leadsto y \cdot z \]
            9. Add Preprocessing

            Developer Target 1: 97.4% accurate, 0.8× 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 2024327 
            (FPCore (x y z t a b)
              :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
              :precision binary64
            
              :alt
              (! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
            
              (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))