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

Percentage Accurate: 97.6% → 98.8%
Time: 8.6s
Alternatives: 16
Speedup: 1.5×

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 16 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.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{b \cdot a}{4} \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(z \cdot t, 0.0625, \mathsf{fma}\left(x, y, \mathsf{fma}\left(b \cdot a, -0.25, c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot -0.25, b, x \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= (- (+ (/ (* z t) 16.0) (* x y)) (/ (* b a) 4.0)) INFINITY)
   (fma (* z t) 0.0625 (fma x y (fma (* b a) -0.25 c)))
   (fma (* a -0.25) b (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0)) <= ((double) INFINITY)) {
		tmp = fma((z * t), 0.0625, fma(x, y, fma((b * a), -0.25, c)));
	} else {
		tmp = fma((a * -0.25), b, (x * y));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(z * t) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) <= Inf)
		tmp = fma(Float64(z * t), 0.0625, fma(x, y, fma(Float64(b * a), -0.25, c)));
	else
		tmp = fma(Float64(a * -0.25), b, Float64(x * y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(z * t), $MachinePrecision] * 0.0625 + N[(x * y + N[(N[(b * a), $MachinePrecision] * -0.25 + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * -0.25), $MachinePrecision] * b + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{b \cdot a}{4} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z \cdot t, 0.0625, \mathsf{fma}\left(x, y, \mathsf{fma}\left(b \cdot a, -0.25, c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0

    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. 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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64)))

    1. Initial program 0.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 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-sign-sub-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.f6471.4

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.25 \cdot a, \color{blue}{b}, x \cdot y\right) \]
    8. Recombined 2 regimes into one program.
    9. Final simplification99.6%

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

    Alternative 2: 75.0% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, x, \left(z \cdot t\right) \cdot 0.0625\right)\\ t_2 := \frac{z \cdot t}{16} + x \cdot y\\ \mathbf{if}\;t\_2 \leq -6 \cdot 10^{+243}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot 0.0625, t, c\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (fma y x (* (* z t) 0.0625))) (t_2 (+ (/ (* z t) 16.0) (* x y))))
       (if (<= t_2 -6e+243)
         t_1
         (if (<= t_2 -5e+44)
           (fma (* z 0.0625) t c)
           (if (<= t_2 5e+70) (fma -0.25 (* b a) c) t_1)))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = fma(y, x, ((z * t) * 0.0625));
    	double t_2 = ((z * t) / 16.0) + (x * y);
    	double tmp;
    	if (t_2 <= -6e+243) {
    		tmp = t_1;
    	} else if (t_2 <= -5e+44) {
    		tmp = fma((z * 0.0625), t, c);
    	} else if (t_2 <= 5e+70) {
    		tmp = fma(-0.25, (b * a), c);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c)
    	t_1 = fma(y, x, Float64(Float64(z * t) * 0.0625))
    	t_2 = Float64(Float64(Float64(z * t) / 16.0) + Float64(x * y))
    	tmp = 0.0
    	if (t_2 <= -6e+243)
    		tmp = t_1;
    	elseif (t_2 <= -5e+44)
    		tmp = fma(Float64(z * 0.0625), t, c);
    	elseif (t_2 <= 5e+70)
    		tmp = fma(-0.25, Float64(b * a), c);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * x + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -6e+243], t$95$1, If[LessEqual[t$95$2, -5e+44], N[(N[(z * 0.0625), $MachinePrecision] * t + c), $MachinePrecision], If[LessEqual[t$95$2, 5e+70], N[(-0.25 * N[(b * a), $MachinePrecision] + c), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(y, x, \left(z \cdot t\right) \cdot 0.0625\right)\\
    t_2 := \frac{z \cdot t}{16} + x \cdot y\\
    \mathbf{if}\;t\_2 \leq -6 \cdot 10^{+243}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+44}:\\
    \;\;\;\;\mathsf{fma}\left(z \cdot 0.0625, t, c\right)\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+70}:\\
    \;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, c\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) < -5.99999999999999969e243 or 5.0000000000000002e70 < (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64)))

      1. Initial program 93.6%

        \[\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 c around 0

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

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

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

          if -5.99999999999999969e243 < (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) < -4.9999999999999996e44

          1. Initial program 99.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-*.f6477.0

              \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
          5. Applied rewrites77.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 rewrites69.4%

              \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
            2. Step-by-step derivation
              1. Applied rewrites69.4%

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

              if -4.9999999999999996e44 < (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) < 5.0000000000000002e70

              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 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-sign-sub-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.6

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

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

                  \[\leadsto \mathsf{fma}\left(-0.25, \color{blue}{a \cdot b}, c\right) \]
              8. Recombined 3 regimes into one program.
              9. Final simplification79.0%

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

              Alternative 3: 64.4% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-0.25, b \cdot a, c\right)\\ \mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot a \leq 2000:\\ \;\;\;\;\mathsf{fma}\left(z \cdot 0.0625, t, c\right)\\ \mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+134}:\\ \;\;\;\;\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 (fma -0.25 (* b a) c)))
                 (if (<= (* b a) -5e+155)
                   t_1
                   (if (<= (* b a) 2000.0)
                     (fma (* z 0.0625) t c)
                     (if (<= (* b a) 2e+134) (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 = fma(-0.25, (b * a), c);
              	double tmp;
              	if ((b * a) <= -5e+155) {
              		tmp = t_1;
              	} else if ((b * a) <= 2000.0) {
              		tmp = fma((z * 0.0625), t, c);
              	} else if ((b * a) <= 2e+134) {
              		tmp = fma(x, y, c);
              	} else {
              		tmp = t_1;
              	}
              	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(b * a) <= -5e+155)
              		tmp = t_1;
              	elseif (Float64(b * a) <= 2000.0)
              		tmp = fma(Float64(z * 0.0625), t, c);
              	elseif (Float64(b * a) <= 2e+134)
              		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[(-0.25 * N[(b * a), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+155], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2000.0], N[(N[(z * 0.0625), $MachinePrecision] * t + c), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+134], N[(x * y + c), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(-0.25, b \cdot a, c\right)\\
              \mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+155}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;b \cdot a \leq 2000:\\
              \;\;\;\;\mathsf{fma}\left(z \cdot 0.0625, t, c\right)\\
              
              \mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+134}:\\
              \;\;\;\;\mathsf{fma}\left(x, y, c\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (*.f64 a b) < -4.9999999999999999e155 or 1.99999999999999984e134 < (*.f64 a b)

                1. Initial program 96.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-sign-sub-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.8

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

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

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

                  if -4.9999999999999999e155 < (*.f64 a b) < 2e3

                  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 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-*.f6493.8

                      \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                  5. Applied rewrites93.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 rewrites68.9%

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

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

                      if 2e3 < (*.f64 a b) < 1.99999999999999984e134

                      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-*.f6486.1

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

                        \[\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.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 rewrites71.7%

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

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

                        Alternative 4: 88.5% accurate, 1.2× speedup?

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

                          1. Initial program 92.5%

                            \[\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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.00000000000000009e25 < (*.f64 a b) < 4.0000000000000002e161

                          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.0

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\right)} \]
                          6. Step-by-step derivation
                            1. Applied rewrites95.0%

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

                            if 4.0000000000000002e161 < (*.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 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-sign-sub-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.f6489.5

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

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

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

                                \[\leadsto \mathsf{fma}\left(-0.25 \cdot a, \color{blue}{b}, x \cdot y\right) \]
                            8. Recombined 3 regimes into one program.
                            9. Final simplification93.3%

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

                            Alternative 5: 88.5% accurate, 1.2× speedup?

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

                              1. Initial program 95.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-sign-sub-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.7

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

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

                              if -4.9999999999999999e155 < (*.f64 a b) < 4.0000000000000002e161

                              1. Initial program 97.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 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-*.f6492.9

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

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

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

                                if 4.0000000000000002e161 < (*.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 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-sign-sub-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.f6489.5

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

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

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

                                    \[\leadsto \mathsf{fma}\left(-0.25 \cdot a, \color{blue}{b}, x \cdot y\right) \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification93.2%

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

                                Alternative 6: 88.5% accurate, 1.2× speedup?

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

                                  1. Initial program 95.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-sign-sub-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.7

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

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

                                  if -4.9999999999999999e155 < (*.f64 a b) < 4.0000000000000002e161

                                  1. Initial program 97.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 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-*.f6492.9

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

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

                                  if 4.0000000000000002e161 < (*.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 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-sign-sub-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.f6489.5

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

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

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

                                      \[\leadsto \mathsf{fma}\left(-0.25 \cdot a, \color{blue}{b}, x \cdot y\right) \]
                                  8. Recombined 3 regimes into one program.
                                  9. Final simplification93.2%

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

                                  Alternative 7: 86.7% accurate, 1.2× speedup?

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

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

                                        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                    5. Applied rewrites79.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 rewrites74.9%

                                        \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, c\right) \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites75.0%

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

                                        if -1.9999999999999999e175 < (*.f64 z t) < 2.00000000000000012e84

                                        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-sign-sub-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.1

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

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

                                        if 2.00000000000000012e84 < (*.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. 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-*.f6487.9

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

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

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

                                            \[\leadsto \mathsf{fma}\left(z \cdot t, \color{blue}{0.0625}, x \cdot y\right) \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites81.6%

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

                                          Alternative 8: 65.2% accurate, 1.2× speedup?

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

                                            1. Initial program 95.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-sign-sub-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.7

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

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

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

                                              if -4.9999999999999999e155 < (*.f64 a b) < 2e3

                                              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 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-*.f6493.8

                                                  \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                              5. Applied rewrites93.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 rewrites68.9%

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

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

                                                  if 2e3 < (*.f64 a b)

                                                  1. Initial program 98.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-sign-sub-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.f6484.6

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(-0.25 \cdot a, \color{blue}{b}, x \cdot y\right) \]
                                                  8. Recombined 3 regimes into one program.
                                                  9. Final simplification75.0%

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

                                                  Alternative 9: 65.3% accurate, 1.2× speedup?

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

                                                    1. Initial program 95.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-sign-sub-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.7

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

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

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

                                                      if -4.9999999999999999e155 < (*.f64 a b) < 2e3

                                                      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 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-*.f6493.8

                                                          \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                                      5. Applied rewrites93.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 rewrites68.9%

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

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

                                                          if 2e3 < (*.f64 a b)

                                                          1. Initial program 98.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-sign-sub-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.f6484.6

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(y, x, \left(-0.25 \cdot a\right) \cdot b\right) \]
                                                            3. Recombined 3 regimes into one program.
                                                            4. Final simplification74.6%

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

                                                            Alternative 10: 65.8% accurate, 1.4× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-0.25, b \cdot a, c\right)\\ \mathbf{if}\;b \cdot a \leq -4 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+134}:\\ \;\;\;\;\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 (fma -0.25 (* b a) c)))
                                                               (if (<= (* b a) -4e+155) t_1 (if (<= (* b a) 2e+134) (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 = fma(-0.25, (b * a), c);
                                                            	double tmp;
                                                            	if ((b * a) <= -4e+155) {
                                                            		tmp = t_1;
                                                            	} else if ((b * a) <= 2e+134) {
                                                            		tmp = fma(x, y, c);
                                                            	} else {
                                                            		tmp = t_1;
                                                            	}
                                                            	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(b * a) <= -4e+155)
                                                            		tmp = t_1;
                                                            	elseif (Float64(b * a) <= 2e+134)
                                                            		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[(-0.25 * N[(b * a), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -4e+155], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2e+134], N[(x * y + c), $MachinePrecision], t$95$1]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            t_1 := \mathsf{fma}\left(-0.25, b \cdot a, c\right)\\
                                                            \mathbf{if}\;b \cdot a \leq -4 \cdot 10^{+155}:\\
                                                            \;\;\;\;t\_1\\
                                                            
                                                            \mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+134}:\\
                                                            \;\;\;\;\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) < -4.00000000000000003e155 or 1.99999999999999984e134 < (*.f64 a b)

                                                              1. Initial program 96.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-sign-sub-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.8

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

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

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

                                                                if -4.00000000000000003e155 < (*.f64 a b) < 1.99999999999999984e134

                                                                1. Initial program 97.6%

                                                                  \[\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-*.f6492.7

                                                                    \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                                                5. Applied rewrites92.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 rewrites64.2%

                                                                    \[\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. Final simplification68.1%

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

                                                                  Alternative 11: 64.4% 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 -4 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot a \leq 10^{+154}:\\ \;\;\;\;\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) -4e+155) t_1 (if (<= (* b a) 1e+154) (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) <= -4e+155) {
                                                                  		tmp = t_1;
                                                                  	} else if ((b * a) <= 1e+154) {
                                                                  		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) <= -4e+155)
                                                                  		tmp = t_1;
                                                                  	elseif (Float64(b * a) <= 1e+154)
                                                                  		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], -4e+155], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e+154], 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 -4 \cdot 10^{+155}:\\
                                                                  \;\;\;\;t\_1\\
                                                                  
                                                                  \mathbf{elif}\;b \cdot a \leq 10^{+154}:\\
                                                                  \;\;\;\;\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) < -4.00000000000000003e155 or 1.00000000000000004e154 < (*.f64 a b)

                                                                    1. Initial program 96.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-*.f6482.6

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

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

                                                                    if -4.00000000000000003e155 < (*.f64 a b) < 1.00000000000000004e154

                                                                    1. Initial program 97.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 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-*.f6492.8

                                                                        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                                                    5. Applied rewrites92.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 rewrites64.6%

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

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

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

                                                                      Alternative 12: 62.3% 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 -2.55 \cdot 10^{+175}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \cdot t \leq 8.8 \cdot 10^{+88}:\\ \;\;\;\;\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) -2.55e+175) t_1 (if (<= (* z t) 8.8e+88) (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) <= -2.55e+175) {
                                                                      		tmp = t_1;
                                                                      	} else if ((z * t) <= 8.8e+88) {
                                                                      		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) <= -2.55e+175)
                                                                      		tmp = t_1;
                                                                      	elseif (Float64(z * t) <= 8.8e+88)
                                                                      		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], -2.55e+175], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 8.8e+88], 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 -2.55 \cdot 10^{+175}:\\
                                                                      \;\;\;\;t\_1\\
                                                                      
                                                                      \mathbf{elif}\;z \cdot t \leq 8.8 \cdot 10^{+88}:\\
                                                                      \;\;\;\;\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) < -2.55000000000000003e175 or 8.80000000000000035e88 < (*.f64 z t)

                                                                        1. Initial program 92.5%

                                                                          \[\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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
                                                                        6. 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-*.f6466.8

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

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

                                                                        if -2.55000000000000003e175 < (*.f64 z t) < 8.80000000000000035e88

                                                                        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-*.f6465.9

                                                                            \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                                                        5. Applied rewrites65.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 rewrites37.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 rewrites56.9%

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

                                                                          Alternative 13: 99.0% accurate, 1.5× speedup?

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

                                                                            \[\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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          Alternative 14: 99.0% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          Alternative 15: 49.6% 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 97.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 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.5

                                                                              \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right)\right) \]
                                                                          5. Applied rewrites71.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 rewrites48.9%

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

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

                                                                              Alternative 16: 29.3% 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 97.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 x around inf

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

                                                                                  \[\leadsto \color{blue}{y \cdot x} \]
                                                                                2. lower-*.f6425.7

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

                                                                                \[\leadsto \color{blue}{y \cdot x} \]
                                                                              6. Final simplification25.7%

                                                                                \[\leadsto x \cdot y \]
                                                                              7. Add Preprocessing

                                                                              Reproduce

                                                                              ?
                                                                              herbie shell --seed 2024332 
                                                                              (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))