Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.5% → 95.5%
Time: 9.0s
Alternatives: 10
Speedup: 1.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 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: 95.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 95.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e-121 < a

    1. Initial program 91.4%

      \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot a, z, \mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\right)} \]
    5. Step-by-step derivation
      1. lift-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(z, y, \mathsf{fma}\left(t, a, x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.19999999999999973e35 or 4e14 < a

    1. Initial program 86.6%

      \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot a, z, \mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\right)} \]
    5. Step-by-step derivation
      1. lift-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999973e35 < a < 4e14

    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 b around 0

      \[\leadsto \color{blue}{x + \left(a \cdot t + y \cdot z\right)} \]
    4. 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}{y \cdot z + \left(x + a \cdot t\right)} \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

Alternative 3: 79.0% accurate, 1.2× speedup?

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

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

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

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


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

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

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

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

    if -7.4999999999999995e49 < b < 3.49999999999999994e80

    1. Initial program 93.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 b around 0

      \[\leadsto \color{blue}{x + \left(a \cdot t + y \cdot z\right)} \]
    4. 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}{y \cdot z + \left(x + a \cdot t\right)} \]
      3. *-commutativeN/A

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

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

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

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

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

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

    if 3.49999999999999994e80 < b

    1. Initial program 95.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.f6472.2

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

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

Alternative 4: 75.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2e7 or 6.8e28 < a

    1. Initial program 87.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 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.f6479.0

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

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

    if -2.2e7 < a < 6.8e28

    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 a around 0

      \[\leadsto \color{blue}{x + y \cdot z} \]
    4. 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.f6478.2

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

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

Alternative 5: 73.6% 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^{-53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.22 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{fma}\left(t, a, 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-53) t_1 (if (<= z 2.22e-7) (fma t a 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-53) {
		tmp = t_1;
	} else if (z <= 2.22e-7) {
		tmp = fma(t, a, 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-53)
		tmp = t_1;
	elseif (z <= 2.22e-7)
		tmp = fma(t, a, 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-53], t$95$1, If[LessEqual[z, 2.22e-7], N[(t * a + 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^{-53}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.3999999999999998e-53 or 2.22e-7 < z

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

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

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

    if -5.3999999999999998e-53 < z < 2.22e-7

    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 z around 0

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

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

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

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

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

Alternative 6: 60.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+209}:\\
\;\;\;\;\mathsf{fma}\left(t, a, x\right)\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.39999999999999996e209 or 6.19999999999999982e-30 < t

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

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

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

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

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

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

    if -2.39999999999999996e209 < t < 6.19999999999999982e-30

    1. Initial program 94.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 a around 0

      \[\leadsto \color{blue}{x + y \cdot z} \]
    4. 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.f6463.4

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

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

Alternative 7: 57.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+69}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(t, a, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.39999999999999991e69 or 3.3000000000000002e139 < y

    1. Initial program 94.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 z} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{z \cdot y} \]
      2. lower-*.f6463.6

        \[\leadsto \color{blue}{z \cdot y} \]
    5. Applied rewrites63.6%

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

    if -1.39999999999999991e69 < y < 3.3000000000000002e139

    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 z around 0

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

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

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

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

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

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

Alternative 8: 94.5% accurate, 1.6× speedup?

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

\\
\mathsf{fma}\left(\mathsf{fma}\left(z, b, t\right), a, \mathsf{fma}\left(y, z, x\right)\right)
\end{array}
Derivation
  1. Initial program 93.8%

    \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
  2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot a, z, \mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\right)} \]
  5. Step-by-step derivation
    1. lift-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 36.2% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-30}:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.39999999999999996e209 or 6.19999999999999982e-30 < t

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

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

        \[\leadsto \color{blue}{t \cdot a} \]
      2. lower-*.f6461.1

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

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

    if -2.39999999999999996e209 < t < 6.19999999999999982e-30

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

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

        \[\leadsto \color{blue}{z \cdot y} \]
      2. lower-*.f6434.1

        \[\leadsto \color{blue}{z \cdot y} \]
    5. Applied rewrites34.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+209}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-30}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 27.4% accurate, 5.0× speedup?

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

\\
t \cdot a
\end{array}
Derivation
  1. Initial program 93.8%

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

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

      \[\leadsto \color{blue}{t \cdot a} \]
    2. lower-*.f6425.2

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

    \[\leadsto \color{blue}{t \cdot a} \]
  6. 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 2024235 
(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)))