Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.5% → 98.3%
Time: 8.2s
Alternatives: 11
Speedup: 0.7×

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 11 alternatives:

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

Initial Program: 92.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 80.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

    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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.0% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.49999999999999993e-121 or 5.40000000000000008e-55 < y

    1. Initial program 90.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 y around inf

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999993e-121 < y < 5.40000000000000008e-55

    1. Initial program 91.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.f6492.7

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

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

Alternative 3: 63.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a \cdot z, b, x\right)\\ \mathbf{if}\;b \leq -1.45 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -4.1 \cdot 10^{-112}:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{+24}:\\ \;\;\;\;\mathsf{fma}\left(z, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma (* a z) b x)))
   (if (<= b -1.45e+68)
     t_1
     (if (<= b -4.1e-112) (fma a t x) (if (<= b 7.2e+24) (fma z y x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma((a * z), b, x);
	double tmp;
	if (b <= -1.45e+68) {
		tmp = t_1;
	} else if (b <= -4.1e-112) {
		tmp = fma(a, t, x);
	} else if (b <= 7.2e+24) {
		tmp = fma(z, y, x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(Float64(a * z), b, x)
	tmp = 0.0
	if (b <= -1.45e+68)
		tmp = t_1;
	elseif (b <= -4.1e-112)
		tmp = fma(a, t, x);
	elseif (b <= 7.2e+24)
		tmp = 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[(a * z), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -1.45e+68], t$95$1, If[LessEqual[b, -4.1e-112], N[(a * t + x), $MachinePrecision], If[LessEqual[b, 7.2e+24], N[(z * y + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4.1 \cdot 10^{-112}:\\
\;\;\;\;\mathsf{fma}\left(a, t, x\right)\\

\mathbf{elif}\;b \leq 7.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.45000000000000006e68 or 7.19999999999999966e24 < b

    1. Initial program 90.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.6

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

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

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

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

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

        if -1.45000000000000006e68 < b < -4.09999999999999996e-112

        1. Initial program 97.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.f6464.6

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

          \[\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.f6486.1

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

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

        if -4.09999999999999996e-112 < b < 7.19999999999999966e24

        1. Initial program 89.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.f6471.7

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

          \[\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.f6464.0

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

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

      Alternative 4: 63.9% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(a, t, z \cdot y\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-67}:\\ \;\;\;\;\mathsf{fma}\left(b \cdot a, z, x\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;\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 (<= t -4.1e+79)
         (fma a t (* z y))
         (if (<= t -2.1e-67)
           (fma (* b a) z x)
           (if (<= t 2.8e+53) (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 (t <= -4.1e+79) {
      		tmp = fma(a, t, (z * y));
      	} else if (t <= -2.1e-67) {
      		tmp = fma((b * a), z, x);
      	} else if (t <= 2.8e+53) {
      		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 (t <= -4.1e+79)
      		tmp = fma(a, t, Float64(z * y));
      	elseif (t <= -2.1e-67)
      		tmp = fma(Float64(b * a), z, x);
      	elseif (t <= 2.8e+53)
      		tmp = fma(z, y, x);
      	else
      		tmp = fma(a, t, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.1e+79], N[(a * t + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-67], N[(N[(b * a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 2.8e+53], N[(z * y + x), $MachinePrecision], N[(a * t + x), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -4.1 \cdot 10^{+79}:\\
      \;\;\;\;\mathsf{fma}\left(a, t, z \cdot y\right)\\
      
      \mathbf{elif}\;t \leq -2.1 \cdot 10^{-67}:\\
      \;\;\;\;\mathsf{fma}\left(b \cdot a, z, x\right)\\
      
      \mathbf{elif}\;t \leq 2.8 \cdot 10^{+53}:\\
      \;\;\;\;\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 4 regimes
      2. if t < -4.1e79

        1. Initial program 92.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto a \cdot t + \color{blue}{y \cdot z} \]
        10. Step-by-step derivation
          1. Applied rewrites81.6%

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

          if -4.1e79 < t < -2.1000000000000002e-67

          1. Initial program 81.6%

            \[\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.f6478.1

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

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

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

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

            if -2.1000000000000002e-67 < t < 2.8e53

            1. Initial program 93.6%

              \[\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.f6490.5

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

              \[\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.f6468.3

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

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

            if 2.8e53 < t

            1. Initial program 89.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.f6452.3

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

              \[\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.f6476.1

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

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

          Alternative 5: 86.6% accurate, 1.2× speedup?

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

            1. Initial program 83.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 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.f6490.4

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

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

            if -0.0085000000000000006 < a < 3.89999999999999973e-82

            1. Initial program 99.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.f6489.9

                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
            5. Applied rewrites89.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 6: 79.8% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+124}:\\ \;\;\;\;\mathsf{fma}\left(a, t, z \cdot y\right)\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+57}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, 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 (<= t -6e+124)
             (fma a t (* z y))
             (if (<= t 2.55e+57) (fma (fma b a y) z x) (fma a t x))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (t <= -6e+124) {
          		tmp = fma(a, t, (z * y));
          	} else if (t <= 2.55e+57) {
          		tmp = fma(fma(b, a, y), z, x);
          	} else {
          		tmp = fma(a, t, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (t <= -6e+124)
          		tmp = fma(a, t, Float64(z * y));
          	elseif (t <= 2.55e+57)
          		tmp = fma(fma(b, a, y), z, x);
          	else
          		tmp = fma(a, t, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6e+124], N[(a * t + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+57], N[(N[(b * a + y), $MachinePrecision] * z + x), $MachinePrecision], N[(a * t + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -6 \cdot 10^{+124}:\\
          \;\;\;\;\mathsf{fma}\left(a, t, z \cdot y\right)\\
          
          \mathbf{elif}\;t \leq 2.55 \cdot 10^{+57}:\\
          \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, a, y\right), z, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if t < -5.9999999999999999e124

            1. Initial program 92.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 y around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto a \cdot t + \color{blue}{y \cdot z} \]
            10. Step-by-step derivation
              1. Applied rewrites86.4%

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

              if -5.9999999999999999e124 < t < 2.55000000000000011e57

              1. Initial program 90.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 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.3

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

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

              if 2.55000000000000011e57 < t

              1. Initial program 89.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.f6452.3

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

                \[\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.f6476.1

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

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

            Alternative 7: 74.2% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b, a, y\right) \cdot z\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{-29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 195000:\\ \;\;\;\;\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 -5.4e-29) t_1 (if (<= z 195000.0) (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 <= -5.4e-29) {
            		tmp = t_1;
            	} else if (z <= 195000.0) {
            		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 <= -5.4e-29)
            		tmp = t_1;
            	elseif (z <= 195000.0)
            		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, -5.4e-29], t$95$1, If[LessEqual[z, 195000.0], 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 -5.4 \cdot 10^{-29}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 195000:\\
            \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -5.40000000000000045e-29 or 195000 < z

              1. Initial program 82.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 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.f6477.1

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

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

              if -5.40000000000000045e-29 < z < 195000

              1. Initial program 99.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 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.5

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

                \[\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.f6477.2

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

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

            Alternative 8: 63.7% accurate, 1.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.000135:\\ \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-82}:\\ \;\;\;\;\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 -0.000135) (fma a t x) (if (<= a 3.9e-82) (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 <= -0.000135) {
            		tmp = fma(a, t, x);
            	} else if (a <= 3.9e-82) {
            		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 <= -0.000135)
            		tmp = fma(a, t, x);
            	elseif (a <= 3.9e-82)
            		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, -0.000135], N[(a * t + x), $MachinePrecision], If[LessEqual[a, 3.9e-82], N[(z * y + x), $MachinePrecision], N[(a * t + x), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq -0.000135:\\
            \;\;\;\;\mathsf{fma}\left(a, t, x\right)\\
            
            \mathbf{elif}\;a \leq 3.9 \cdot 10^{-82}:\\
            \;\;\;\;\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 2 regimes
            2. if a < -1.35000000000000002e-4 or 3.89999999999999973e-82 < a

              1. Initial program 83.6%

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

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

                \[\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)} \]

              if -1.35000000000000002e-4 < a < 3.89999999999999973e-82

              1. Initial program 99.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.f6489.8

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(b, a, y\right)}, z, x\right) \]
              5. Applied rewrites89.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.f6479.0

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

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

            Alternative 9: 58.0% accurate, 1.6× speedup?

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

              1. Initial program 75.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 inf

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \color{blue}{z} \]
              7. Step-by-step derivation
                1. Applied rewrites56.5%

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

                if -1.39999999999999992e227 < z < 1.55000000000000002e56

                1. Initial program 96.3%

                  \[\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.f6467.9

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

                  \[\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.f6467.1

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

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

              Alternative 10: 39.2% accurate, 1.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-11}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-82}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (<= a -2e-11) (* a t) (if (<= a 3.9e-82) (* z y) (* a t))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (a <= -2e-11) {
              		tmp = a * t;
              	} else if (a <= 3.9e-82) {
              		tmp = z * y;
              	} else {
              		tmp = a * t;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: tmp
                  if (a <= (-2d-11)) then
                      tmp = a * t
                  else if (a <= 3.9d-82) then
                      tmp = z * y
                  else
                      tmp = a * t
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (a <= -2e-11) {
              		tmp = a * t;
              	} else if (a <= 3.9e-82) {
              		tmp = z * y;
              	} else {
              		tmp = a * t;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	tmp = 0
              	if a <= -2e-11:
              		tmp = a * t
              	elif a <= 3.9e-82:
              		tmp = z * y
              	else:
              		tmp = a * t
              	return tmp
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if (a <= -2e-11)
              		tmp = Float64(a * t);
              	elseif (a <= 3.9e-82)
              		tmp = Float64(z * y);
              	else
              		tmp = Float64(a * t);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	tmp = 0.0;
              	if (a <= -2e-11)
              		tmp = a * t;
              	elseif (a <= 3.9e-82)
              		tmp = z * y;
              	else
              		tmp = a * t;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2e-11], N[(a * t), $MachinePrecision], If[LessEqual[a, 3.9e-82], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;a \leq -2 \cdot 10^{-11}:\\
              \;\;\;\;a \cdot t\\
              
              \mathbf{elif}\;a \leq 3.9 \cdot 10^{-82}:\\
              \;\;\;\;z \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;a \cdot t\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if a < -1.99999999999999988e-11 or 3.89999999999999973e-82 < a

                1. Initial program 83.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.1

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

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

                if -1.99999999999999988e-11 < a < 3.89999999999999973e-82

                1. Initial program 99.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 y around inf

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto y \cdot \color{blue}{z} \]
                7. Step-by-step derivation
                  1. Applied rewrites41.3%

                    \[\leadsto z \cdot \color{blue}{y} \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 11: 28.0% accurate, 5.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto y \cdot \color{blue}{z} \]
                7. Step-by-step derivation
                  1. Applied rewrites27.0%

                    \[\leadsto z \cdot \color{blue}{y} \]
                  2. Add Preprocessing

                  Developer Target 1: 97.5% 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 2024332 
                  (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)))