Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C

Percentage Accurate: 97.6% → 98.4%
Time: 8.9s
Alternatives: 13
Speedup: 1.4×

Specification

?
\[\begin{array}{l} \\ \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
    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), intent (in) :: c
    code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c):
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c)
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\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 13 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: 97.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
    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), intent (in) :: c
    code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c):
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c)
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}

Alternative 1: 98.4% accurate, 1.4× speedup?

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

\\
c + \mathsf{fma}\left(-a, 0.25 \cdot b, \mathsf{fma}\left(0.0625, z \cdot t, x \cdot y\right)\right)
\end{array}
Derivation
  1. Initial program 98.8%

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

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

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

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

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

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

      \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{a \cdot \frac{b}{4}}\right)\right) + \left(x \cdot y + \frac{z \cdot t}{16}\right)\right) + c \]
    7. distribute-lft-neg-inN/A

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-a, \color{blue}{b \cdot \frac{1}{4}}, x \cdot y + \frac{z \cdot t}{16}\right) + c \]
    12. metadata-eval99.2

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \color{blue}{\mathsf{fma}\left(\frac{1}{16}, z \cdot t, x \cdot y\right)}\right) + c \]
    19. metadata-eval99.2

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

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

      \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, \color{blue}{t \cdot z}, x \cdot y\right)\right) + c \]
    22. lower-*.f6499.2

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

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

      \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, t \cdot z, \color{blue}{y \cdot x}\right)\right) + c \]
    25. lower-*.f6499.2

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-a, b \cdot 0.25, \mathsf{fma}\left(0.0625, t \cdot z, y \cdot x\right)\right)} + c \]
  5. Final simplification99.2%

    \[\leadsto c + \mathsf{fma}\left(-a, 0.25 \cdot b, \mathsf{fma}\left(0.0625, z \cdot t, x \cdot y\right)\right) \]
  6. Add Preprocessing

Alternative 2: 63.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-0.25, b \cdot a, c\right)\\
\mathbf{if}\;z \cdot t \leq -1.7 \cdot 10^{+95}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot t, 0.0625, c\right)\\

\mathbf{elif}\;z \cdot t \leq -9.6 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \cdot t \leq 2.5 \cdot 10^{+237}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z t) < -1.70000000000000011e95

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

        \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
      3. *-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
      8. lower-*.f6488.5

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
    5. Applied rewrites88.5%

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

      \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites76.6%

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

      if -1.70000000000000011e95 < (*.f64 z t) < -9.59999999999999959e-272 or 1.30000000000000011e-134 < (*.f64 z t) < 2.5000000000000001e237

      1. Initial program 99.2%

        \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
      4. Step-by-step derivation
        1. cancel-sub-sign-invN/A

          \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
        2. metadata-evalN/A

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
        6. lower-*.f64N/A

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
        9. lower-fma.f6488.0

          \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
      5. Applied rewrites88.0%

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

        \[\leadsto c + \color{blue}{\frac{-1}{4} \cdot \left(a \cdot b\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites66.9%

          \[\leadsto \mathsf{fma}\left(-0.25, \color{blue}{b \cdot a}, c\right) \]

        if -9.59999999999999959e-272 < (*.f64 z t) < 1.30000000000000011e-134

        1. Initial program 100.0%

          \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
        2. Add Preprocessing
        3. Taylor expanded in a around 0

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

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

            \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
          3. *-commutativeN/A

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

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

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

            \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
          7. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
          8. lower-*.f6474.8

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

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

          \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
        7. Step-by-step derivation
          1. Applied rewrites30.3%

            \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
          2. Taylor expanded in z around 0

            \[\leadsto c + \color{blue}{x \cdot y} \]
          3. Step-by-step derivation
            1. Applied rewrites74.8%

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

            if 2.5000000000000001e237 < (*.f64 z t)

            1. Initial program 90.9%

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

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

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

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

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

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

                \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{a \cdot \frac{b}{4}}\right)\right) + \left(x \cdot y + \frac{z \cdot t}{16}\right)\right) + c \]
              7. distribute-lft-neg-inN/A

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-a, \color{blue}{b \cdot \frac{1}{4}}, x \cdot y + \frac{z \cdot t}{16}\right) + c \]
              12. metadata-eval95.5

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \color{blue}{\mathsf{fma}\left(\frac{1}{16}, z \cdot t, x \cdot y\right)}\right) + c \]
              19. metadata-eval95.5

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

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

                \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, \color{blue}{t \cdot z}, x \cdot y\right)\right) + c \]
              22. lower-*.f6495.5

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

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

                \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, t \cdot z, \color{blue}{y \cdot x}\right)\right) + c \]
              25. lower-*.f6495.5

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

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

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

                \[\leadsto \color{blue}{x \cdot y} \]
            7. Applied rewrites11.3%

              \[\leadsto \color{blue}{x \cdot y} \]
            8. Taylor expanded in z around inf

              \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} \]
              3. *-commutativeN/A

                \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{1}{16} \]
              4. lower-*.f6486.7

                \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot 0.0625 \]
            10. Applied rewrites86.7%

              \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} \]
          4. Recombined 4 regimes into one program.
          5. Add Preprocessing

          Alternative 3: 89.1% accurate, 1.0× speedup?

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

            1. Initial program 98.3%

              \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
            2. Add Preprocessing
            3. Taylor expanded in z around 0

              \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
            4. Step-by-step derivation
              1. cancel-sub-sign-invN/A

                \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
              2. metadata-evalN/A

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
              6. lower-*.f64N/A

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

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

                \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
              9. lower-fma.f6491.6

                \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
            5. Applied rewrites91.6%

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

            if -9.99999999999999954e36 < (*.f64 x y) < 5e79

            1. Initial program 99.3%

              \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \color{blue}{\left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
            4. Step-by-step derivation
              1. cancel-sub-sign-invN/A

                \[\leadsto \color{blue}{\left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
              2. metadata-evalN/A

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) \]
              7. +-commutativeN/A

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

                \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
              9. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
              10. lower-*.f6496.2

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites96.8%

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

              if 5e79 < (*.f64 x y)

              1. Initial program 97.9%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in a around 0

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

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

                  \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                3. *-commutativeN/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                7. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                8. lower-*.f6486.6

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\right)} \]
            7. Recombined 3 regimes into one program.
            8. Final simplification93.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(-0.25 \cdot b, a, \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\right)\\ \end{array} \]
            9. Add Preprocessing

            Alternative 4: 88.8% accurate, 1.0× speedup?

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

              1. Initial program 96.7%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
              4. Step-by-step derivation
                1. cancel-sub-sign-invN/A

                  \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                2. metadata-evalN/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
                6. lower-*.f64N/A

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
                9. lower-fma.f6490.2

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

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

              if -2e30 < (*.f64 x y) < 5e79

              1. Initial program 100.0%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \color{blue}{\left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
              4. Step-by-step derivation
                1. cancel-sub-sign-invN/A

                  \[\leadsto \color{blue}{\left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                2. metadata-evalN/A

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) \]
                7. +-commutativeN/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                9. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                10. lower-*.f6496.8

                  \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
              5. Applied rewrites96.8%

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

              if 5e79 < (*.f64 x y)

              1. Initial program 97.9%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in a around 0

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

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

                  \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                3. *-commutativeN/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                7. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                8. lower-*.f6486.6

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+30}:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 5: 88.4% accurate, 1.1× speedup?

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

              1. Initial program 100.0%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in a around 0

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

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

                  \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                3. *-commutativeN/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                7. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                8. lower-*.f6488.5

                  \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
              5. Applied rewrites88.5%

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

              if -4.00000000000000008e95 < (*.f64 z t) < 1e188

              1. Initial program 99.4%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
              4. Step-by-step derivation
                1. cancel-sub-sign-invN/A

                  \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                2. metadata-evalN/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
                6. lower-*.f64N/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
              5. Applied rewrites92.9%

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

              if 1e188 < (*.f64 z t)

              1. Initial program 92.8%

                \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \color{blue}{\left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
              4. Step-by-step derivation
                1. cancel-sub-sign-invN/A

                  \[\leadsto \color{blue}{\left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                2. metadata-evalN/A

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + \frac{1}{16} \cdot \left(t \cdot z\right)\right) \]
                7. +-commutativeN/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                9. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                10. lower-*.f6489.2

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\right)} \]
              6. Step-by-step derivation
                1. Applied rewrites92.9%

                  \[\leadsto \mathsf{fma}\left(-0.25 \cdot b, \color{blue}{a}, \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\right) \]
                2. Taylor expanded in c around 0

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

                    \[\leadsto \mathsf{fma}\left(-0.25, \color{blue}{b \cdot a}, \left(z \cdot t\right) \cdot 0.0625\right) \]
                  2. Step-by-step derivation
                    1. Applied rewrites90.3%

                      \[\leadsto \mathsf{fma}\left(a \cdot -0.25, b, \left(t \cdot 0.0625\right) \cdot z\right) \]
                  3. Recombined 3 regimes into one program.
                  4. Final simplification91.7%

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

                  Alternative 6: 89.0% accurate, 1.2× speedup?

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

                    1. Initial program 98.3%

                      \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around 0

                      \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
                    4. Step-by-step derivation
                      1. cancel-sub-sign-invN/A

                        \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                      2. metadata-evalN/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
                      6. lower-*.f64N/A

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
                      9. lower-fma.f6486.8

                        \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
                    5. Applied rewrites86.8%

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

                    if -1e-8 < (*.f64 a b) < 9.9999999999999994e162

                    1. Initial program 99.3%

                      \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                    2. Add Preprocessing
                    3. Taylor expanded in a around 0

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

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

                        \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                      3. *-commutativeN/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                      7. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                      8. lower-*.f6495.6

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -1 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\ \mathbf{elif}\;b \cdot a \leq 10^{+163}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 7: 85.2% accurate, 1.2× speedup?

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

                    1. Initial program 100.0%

                      \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                    2. Add Preprocessing
                    3. Taylor expanded in a around 0

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

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

                        \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                      3. *-commutativeN/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                      7. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                      8. lower-*.f6489.0

                        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                    5. Applied rewrites89.0%

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

                      \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                    7. Step-by-step derivation
                      1. Applied rewrites79.9%

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

                      if -1.3e115 < (*.f64 z t) < 4.30000000000000004e241

                      1. Initial program 99.5%

                        \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                      2. Add Preprocessing
                      3. Taylor expanded in z around 0

                        \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
                      4. Step-by-step derivation
                        1. cancel-sub-sign-invN/A

                          \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                        2. metadata-evalN/A

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
                        6. lower-*.f64N/A

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
                        9. lower-fma.f6491.2

                          \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
                      5. Applied rewrites91.2%

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

                      if 4.30000000000000004e241 < (*.f64 z t)

                      1. Initial program 90.9%

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

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

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

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

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

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

                          \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{a \cdot \frac{b}{4}}\right)\right) + \left(x \cdot y + \frac{z \cdot t}{16}\right)\right) + c \]
                        7. distribute-lft-neg-inN/A

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-a, \color{blue}{b \cdot \frac{1}{4}}, x \cdot y + \frac{z \cdot t}{16}\right) + c \]
                        12. metadata-eval95.5

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \color{blue}{\mathsf{fma}\left(\frac{1}{16}, z \cdot t, x \cdot y\right)}\right) + c \]
                        19. metadata-eval95.5

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

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

                          \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, \color{blue}{t \cdot z}, x \cdot y\right)\right) + c \]
                        22. lower-*.f6495.5

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

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

                          \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, t \cdot z, \color{blue}{y \cdot x}\right)\right) + c \]
                        25. lower-*.f6495.5

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

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

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

                          \[\leadsto \color{blue}{x \cdot y} \]
                      7. Applied rewrites11.3%

                        \[\leadsto \color{blue}{x \cdot y} \]
                      8. Taylor expanded in z around inf

                        \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                      9. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} \]
                        3. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{1}{16} \]
                        4. lower-*.f6486.7

                          \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot 0.0625 \]
                      10. Applied rewrites86.7%

                        \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} \]
                    8. Recombined 3 regimes into one program.
                    9. Add Preprocessing

                    Alternative 8: 64.9% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\\ \mathbf{if}\;z \cdot t \leq -255000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \cdot t \leq 520000:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c)
                     :precision binary64
                     (let* ((t_1 (fma (* z t) 0.0625 c)))
                       (if (<= (* z t) -255000.0)
                         t_1
                         (if (<= (* z t) 520000.0) (fma -0.25 (* b a) (* x y)) t_1))))
                    double code(double x, double y, double z, double t, double a, double b, double c) {
                    	double t_1 = fma((z * t), 0.0625, c);
                    	double tmp;
                    	if ((z * t) <= -255000.0) {
                    		tmp = t_1;
                    	} else if ((z * t) <= 520000.0) {
                    		tmp = fma(-0.25, (b * a), (x * y));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c)
                    	t_1 = fma(Float64(z * t), 0.0625, c)
                    	tmp = 0.0
                    	if (Float64(z * t) <= -255000.0)
                    		tmp = t_1;
                    	elseif (Float64(z * t) <= 520000.0)
                    		tmp = fma(-0.25, Float64(b * a), Float64(x * y));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] * 0.0625 + c), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -255000.0], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 520000.0], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \mathsf{fma}\left(z \cdot t, 0.0625, c\right)\\
                    \mathbf{if}\;z \cdot t \leq -255000:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \cdot t \leq 520000:\\
                    \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, x \cdot y\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 z t) < -255000 or 5.2e5 < (*.f64 z t)

                      1. Initial program 98.3%

                        \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                      2. Add Preprocessing
                      3. Taylor expanded in a around 0

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

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

                          \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                        3. *-commutativeN/A

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

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

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

                          \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                        7. lower-fma.f64N/A

                          \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                        8. lower-*.f6480.6

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

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

                        \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites69.1%

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

                        if -255000 < (*.f64 z t) < 5.2e5

                        1. Initial program 99.3%

                          \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                        2. Add Preprocessing
                        3. Taylor expanded in z around 0

                          \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
                        4. Step-by-step derivation
                          1. cancel-sub-sign-invN/A

                            \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                          2. metadata-evalN/A

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
                          6. lower-*.f64N/A

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
                          9. lower-fma.f6497.3

                            \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
                        5. Applied rewrites97.3%

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

                          \[\leadsto c + \color{blue}{\frac{-1}{4} \cdot \left(a \cdot b\right)} \]
                        7. Step-by-step derivation
                          1. Applied rewrites64.0%

                            \[\leadsto \mathsf{fma}\left(-0.25, \color{blue}{b \cdot a}, c\right) \]
                          2. Taylor expanded in c around 0

                            \[\leadsto \frac{-1}{4} \cdot \left(a \cdot b\right) + \color{blue}{x \cdot y} \]
                          3. Step-by-step derivation
                            1. Applied rewrites73.3%

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

                          Alternative 9: 65.2% accurate, 1.4× speedup?

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

                            1. Initial program 97.8%

                              \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                            2. Add Preprocessing
                            3. Taylor expanded in a around 0

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

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

                                \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                              3. *-commutativeN/A

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                              7. lower-fma.f64N/A

                                \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                              8. lower-*.f6485.6

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

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

                              \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                            7. Step-by-step derivation
                              1. Applied rewrites26.0%

                                \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
                              2. Taylor expanded in z around 0

                                \[\leadsto c + \color{blue}{x \cdot y} \]
                              3. Step-by-step derivation
                                1. Applied rewrites75.2%

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

                                if -2e120 < (*.f64 x y) < 5e79

                                1. Initial program 99.4%

                                  \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                                2. Add Preprocessing
                                3. Taylor expanded in z around 0

                                  \[\leadsto \color{blue}{\left(c + x \cdot y\right) - \frac{1}{4} \cdot \left(a \cdot b\right)} \]
                                4. Step-by-step derivation
                                  1. cancel-sub-sign-invN/A

                                    \[\leadsto \color{blue}{\left(c + x \cdot y\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                                  2. metadata-evalN/A

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, \color{blue}{b \cdot a}, c + x \cdot y\right) \]
                                  6. lower-*.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{4}, b \cdot a, \color{blue}{y \cdot x} + c\right) \]
                                  9. lower-fma.f6469.2

                                    \[\leadsto \mathsf{fma}\left(-0.25, b \cdot a, \color{blue}{\mathsf{fma}\left(y, x, c\right)}\right) \]
                                5. Applied rewrites69.2%

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

                                  \[\leadsto c + \color{blue}{\frac{-1}{4} \cdot \left(a \cdot b\right)} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites64.5%

                                    \[\leadsto \mathsf{fma}\left(-0.25, \color{blue}{b \cdot a}, c\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Add Preprocessing

                                Alternative 10: 63.1% accurate, 1.4× speedup?

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

                                  1. Initial program 97.3%

                                    \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in a around inf

                                    \[\leadsto \color{blue}{\frac{-1}{4} \cdot \left(a \cdot b\right)} \]
                                  4. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\frac{-1}{4} \cdot \left(a \cdot b\right)} \]
                                    2. *-commutativeN/A

                                      \[\leadsto \frac{-1}{4} \cdot \color{blue}{\left(b \cdot a\right)} \]
                                    3. lower-*.f6478.0

                                      \[\leadsto -0.25 \cdot \color{blue}{\left(b \cdot a\right)} \]
                                  5. Applied rewrites78.0%

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

                                  if -1.00000000000000007e174 < (*.f64 a b) < 4.0000000000000001e143

                                  1. Initial program 99.4%

                                    \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in a around 0

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

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

                                      \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                                    3. *-commutativeN/A

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

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

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

                                      \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                                    7. lower-fma.f64N/A

                                      \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                                    8. lower-*.f6488.9

                                      \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                  5. Applied rewrites88.9%

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

                                    \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites59.1%

                                      \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
                                    2. Taylor expanded in z around 0

                                      \[\leadsto c + \color{blue}{x \cdot y} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites59.5%

                                        \[\leadsto \mathsf{fma}\left(x, \color{blue}{y}, c\right) \]
                                    4. Recombined 2 regimes into one program.
                                    5. Final simplification65.0%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+174}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{fma}\left(x, y, c\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \end{array} \]
                                    6. Add Preprocessing

                                    Alternative 11: 62.9% accurate, 1.4× speedup?

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

                                      1. Initial program 97.4%

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

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

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

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

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

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

                                          \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{a \cdot \frac{b}{4}}\right)\right) + \left(x \cdot y + \frac{z \cdot t}{16}\right)\right) + c \]
                                        7. distribute-lft-neg-inN/A

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(-a, \color{blue}{b \cdot \frac{1}{4}}, x \cdot y + \frac{z \cdot t}{16}\right) + c \]
                                        12. metadata-eval98.7

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \color{blue}{\mathsf{fma}\left(\frac{1}{16}, z \cdot t, x \cdot y\right)}\right) + c \]
                                        19. metadata-eval98.7

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

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

                                          \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, \color{blue}{t \cdot z}, x \cdot y\right)\right) + c \]
                                        22. lower-*.f6498.7

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

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

                                          \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, t \cdot z, \color{blue}{y \cdot x}\right)\right) + c \]
                                        25. lower-*.f6498.7

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

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

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

                                          \[\leadsto \color{blue}{x \cdot y} \]
                                      7. Applied rewrites13.7%

                                        \[\leadsto \color{blue}{x \cdot y} \]
                                      8. Taylor expanded in z around inf

                                        \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                                      9. Step-by-step derivation
                                        1. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} \]
                                        2. lower-*.f64N/A

                                          \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} \]
                                        3. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \frac{1}{16} \]
                                        4. lower-*.f6468.9

                                          \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot 0.0625 \]
                                      10. Applied rewrites68.9%

                                        \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} \]

                                      if -3.1500000000000001e111 < (*.f64 z t) < 4.19999999999999978e159

                                      1. Initial program 99.4%

                                        \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in a around 0

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

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

                                          \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                                        3. *-commutativeN/A

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                                        7. lower-fma.f64N/A

                                          \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                                        8. lower-*.f6467.0

                                          \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                      5. Applied rewrites67.0%

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

                                        \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites36.0%

                                          \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
                                        2. Taylor expanded in z around 0

                                          \[\leadsto c + \color{blue}{x \cdot y} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites60.2%

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

                                        Alternative 12: 48.9% accurate, 6.7× speedup?

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

                                          \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in a around 0

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

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

                                            \[\leadsto \color{blue}{x \cdot y + \left(c + \frac{1}{16} \cdot \left(t \cdot z\right)\right)} \]
                                          3. *-commutativeN/A

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

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

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

                                            \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c\right) \]
                                          7. lower-fma.f64N/A

                                            \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)}\right) \]
                                          8. lower-*.f6471.7

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

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

                                          \[\leadsto c + \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites47.7%

                                            \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
                                          2. Taylor expanded in z around 0

                                            \[\leadsto c + \color{blue}{x \cdot y} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites47.5%

                                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{y}, c\right) \]
                                            2. Add Preprocessing

                                            Alternative 13: 28.6% accurate, 7.8× speedup?

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

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

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

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

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

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

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

                                                \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{a \cdot \frac{b}{4}}\right)\right) + \left(x \cdot y + \frac{z \cdot t}{16}\right)\right) + c \]
                                              7. distribute-lft-neg-inN/A

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(-a, \color{blue}{b \cdot \frac{1}{4}}, x \cdot y + \frac{z \cdot t}{16}\right) + c \]
                                              12. metadata-eval99.2

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \color{blue}{\mathsf{fma}\left(\frac{1}{16}, z \cdot t, x \cdot y\right)}\right) + c \]
                                              19. metadata-eval99.2

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

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

                                                \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, \color{blue}{t \cdot z}, x \cdot y\right)\right) + c \]
                                              22. lower-*.f6499.2

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

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

                                                \[\leadsto \mathsf{fma}\left(-a, b \cdot \frac{1}{4}, \mathsf{fma}\left(\frac{1}{16}, t \cdot z, \color{blue}{y \cdot x}\right)\right) + c \]
                                              25. lower-*.f6499.2

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

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

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

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

                                              \[\leadsto \color{blue}{x \cdot y} \]
                                            8. Add Preprocessing

                                            Reproduce

                                            ?
                                            herbie shell --seed 2024298 
                                            (FPCore (x y z t a b c)
                                              :name "Diagrams.Solve.Polynomial:quartForm  from diagrams-solve-0.1, C"
                                              :precision binary64
                                              (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))