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

Percentage Accurate: 97.8% → 99.0%
Time: 11.9s
Alternatives: 16
Speedup: 1.6×

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.8% 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: 99.0% accurate, 1.5× speedup?

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

\\
\mathsf{fma}\left(t \cdot 0.0625, z, \mathsf{fma}\left(x, y, \left(a \cdot b\right) \cdot -0.25\right)\right) + c
\end{array}
Derivation
  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. Step-by-step derivation
    1. 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 \]
    2. +-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 \]
    3. 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 \]
    4. 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 \]
    5. *-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 \]
    6. accelerator-lowering-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 \]
    7. 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 \]
    8. *-lowering-*.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 \]
    9. 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 \]
    10. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, y, 0.0625 \cdot \left(t \cdot z\right)\right)\\
t_2 := x \cdot y + \frac{t \cdot z}{16}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+49}:\\
\;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) < -1.9999999999999999e74 or 3.99999999999999979e49 < (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64)))

    1. Initial program 98.9%

      \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. 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 \]
      2. +-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 \]
      3. 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 \]
      4. 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 \]
      5. *-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 \]
      6. accelerator-lowering-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 \]
      7. 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 \]
      8. *-lowering-*.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 \]
      9. 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 \]
      10. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(t \cdot \frac{1}{16}, z, \color{blue}{x \cdot y}\right) + c \]
    6. Step-by-step derivation
      1. *-lowering-*.f6485.7

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)}\right) \]
      4. *-lowering-*.f6472.6

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

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

    if -1.9999999999999999e74 < (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) < 3.99999999999999979e49

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

      \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{c}\right) \]
    7. Step-by-step derivation
      1. Simplified84.8%

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

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

    Alternative 3: 66.5% accurate, 0.8× speedup?

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

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
        2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{c}\right) \]
      7. Step-by-step derivation
        1. Simplified79.7%

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

        if -2e19 < (*.f64 a b) < -9.9999999999999996e-281 or 5.0000000000000002e-169 < (*.f64 a b) < 1.00000000000000005e96

        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 inf

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

            \[\leadsto \color{blue}{\left(\frac{1}{16} \cdot \left(t \cdot z\right) + 0\right)} + c \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{16}, t \cdot z, 0\right)} + c \]
          3. *-lowering-*.f6473.1

            \[\leadsto \mathsf{fma}\left(0.0625, \color{blue}{t \cdot z}, 0\right) + c \]
        5. Simplified73.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(0.0625, t \cdot z, 0\right)} + c \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

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

            \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)} \]
          4. *-lowering-*.f6473.1

            \[\leadsto \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right) \]
        7. Applied egg-rr73.1%

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

        if -9.9999999999999996e-281 < (*.f64 a b) < 5.0000000000000002e-169

        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 x around inf

          \[\leadsto \color{blue}{x \cdot y} + c \]
        4. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \color{blue}{\left(x \cdot y + 0\right)} + c \]
          2. accelerator-lowering-fma.f6473.0

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
        5. Simplified73.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

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

            \[\leadsto \color{blue}{y \cdot x} + c \]
          3. accelerator-lowering-fma.f6473.1

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
        7. Applied egg-rr73.1%

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

        if 1.00000000000000005e96 < (*.f64 a b)

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
          2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{x \cdot y}\right) \]
        7. Step-by-step derivation
          1. *-lowering-*.f6475.0

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

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

      Alternative 4: 65.8% accurate, 0.8× speedup?

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

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
          2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{c}\right) \]
        7. Step-by-step derivation
          1. Simplified74.8%

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

          if -2e19 < (*.f64 a b) < -9.9999999999999996e-281 or 5.0000000000000002e-169 < (*.f64 a b) < 1.00000000000000005e96

          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 inf

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

              \[\leadsto \color{blue}{\left(\frac{1}{16} \cdot \left(t \cdot z\right) + 0\right)} + c \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{16}, t \cdot z, 0\right)} + c \]
            3. *-lowering-*.f6473.1

              \[\leadsto \mathsf{fma}\left(0.0625, \color{blue}{t \cdot z}, 0\right) + c \]
          5. Simplified73.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(0.0625, t \cdot z, 0\right)} + c \]
          6. Step-by-step derivation
            1. +-rgt-identityN/A

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

              \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \frac{1}{16}} + c \]
            3. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot z, \frac{1}{16}, c\right)} \]
            4. *-lowering-*.f6473.1

              \[\leadsto \mathsf{fma}\left(\color{blue}{t \cdot z}, 0.0625, c\right) \]
          7. Applied egg-rr73.1%

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

          if -9.9999999999999996e-281 < (*.f64 a b) < 5.0000000000000002e-169

          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 x around inf

            \[\leadsto \color{blue}{x \cdot y} + c \]
          4. Step-by-step derivation
            1. +-rgt-identityN/A

              \[\leadsto \color{blue}{\left(x \cdot y + 0\right)} + c \]
            2. accelerator-lowering-fma.f6473.0

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
          5. Simplified73.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
          6. Step-by-step derivation
            1. +-rgt-identityN/A

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

              \[\leadsto \color{blue}{y \cdot x} + c \]
            3. accelerator-lowering-fma.f6473.1

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
          7. Applied egg-rr73.1%

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

        Alternative 5: 60.5% accurate, 0.8× speedup?

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

          1. Initial program 97.8%

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

            \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
          4. Step-by-step derivation
            1. +-rgt-identityN/A

              \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right) + 0} \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{16}, t \cdot z, 0\right)} \]
            3. *-lowering-*.f6475.7

              \[\leadsto \mathsf{fma}\left(0.0625, \color{blue}{t \cdot z}, 0\right) \]
          5. Simplified75.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(0.0625, t \cdot z, 0\right)} \]
          6. Step-by-step derivation
            1. +-rgt-identityN/A

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

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

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

              \[\leadsto \color{blue}{\left(t \cdot \frac{1}{16}\right) \cdot z} \]
            5. *-lowering-*.f6477.9

              \[\leadsto \color{blue}{\left(t \cdot 0.0625\right)} \cdot z \]
          7. Applied egg-rr77.9%

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

          if -4.9999999999999996e248 < (*.f64 z t) < -1.9999999999999999e-40 or -3.49999999999999991e-299 < (*.f64 z t) < 4.99999999999999977e36

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

            \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
            2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.9999999999999999e-40 < (*.f64 z t) < -3.49999999999999991e-299

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{x \cdot y} + c \]
            4. Step-by-step derivation
              1. +-rgt-identityN/A

                \[\leadsto \color{blue}{\left(x \cdot y + 0\right)} + c \]
              2. accelerator-lowering-fma.f6474.5

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
            5. Simplified74.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
            6. Step-by-step derivation
              1. +-rgt-identityN/A

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

                \[\leadsto \color{blue}{y \cdot x} + c \]
              3. accelerator-lowering-fma.f6474.5

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
            7. Applied egg-rr74.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
          8. Recombined 3 regimes into one program.
          9. Final simplification72.1%

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

          Alternative 6: 88.5% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(0.0625, t \cdot z, \mathsf{fma}\left(a, b \cdot -0.25, c\right)\right)\\ \mathbf{if}\;t \cdot z \leq -1:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+36}:\\ \;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, \mathsf{fma}\left(x, y, c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c)
           :precision binary64
           (let* ((t_1 (fma 0.0625 (* t z) (fma a (* b -0.25) c))))
             (if (<= (* t z) -1.0)
               t_1
               (if (<= (* t z) 5e+36) (fma a (* b -0.25) (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.0625, (t * z), fma(a, (b * -0.25), c));
          	double tmp;
          	if ((t * z) <= -1.0) {
          		tmp = t_1;
          	} else if ((t * z) <= 5e+36) {
          		tmp = fma(a, (b * -0.25), fma(x, y, c));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c)
          	t_1 = fma(0.0625, Float64(t * z), fma(a, Float64(b * -0.25), c))
          	tmp = 0.0
          	if (Float64(t * z) <= -1.0)
          		tmp = t_1;
          	elseif (Float64(t * z) <= 5e+36)
          		tmp = fma(a, Float64(b * -0.25), 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.0625 * N[(t * z), $MachinePrecision] + N[(a * N[(b * -0.25), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -1.0], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+36], N[(a * N[(b * -0.25), $MachinePrecision] + N[(x * y + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \mathsf{fma}\left(0.0625, t \cdot z, \mathsf{fma}\left(a, b \cdot -0.25, c\right)\right)\\
          \mathbf{if}\;t \cdot z \leq -1:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+36}:\\
          \;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, \mathsf{fma}\left(x, y, c\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 z t) < -1 or 4.99999999999999977e36 < (*.f64 z t)

            1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1 < (*.f64 z t) < 4.99999999999999977e36

            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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 57.2% accurate, 1.1× speedup?

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

            1. Initial program 98.3%

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

              \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)} \]
            4. Step-by-step derivation
              1. +-rgt-identityN/A

                \[\leadsto \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right) + 0} \]
              2. accelerator-lowering-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{16}, t \cdot z, 0\right)} \]
              3. *-lowering-*.f6468.6

                \[\leadsto \mathsf{fma}\left(0.0625, \color{blue}{t \cdot z}, 0\right) \]
            5. Simplified68.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(0.0625, t \cdot z, 0\right)} \]
            6. Step-by-step derivation
              1. +-rgt-identityN/A

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

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

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

                \[\leadsto \color{blue}{\left(t \cdot \frac{1}{16}\right) \cdot z} \]
              5. *-lowering-*.f6470.3

                \[\leadsto \color{blue}{\left(t \cdot 0.0625\right)} \cdot z \]
            7. Applied egg-rr70.3%

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

            if -3.0000000000000002e49 < (*.f64 z t) < 2.00000000000000011e-128

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{x \cdot y} + c \]
            4. Step-by-step derivation
              1. +-rgt-identityN/A

                \[\leadsto \color{blue}{\left(x \cdot y + 0\right)} + c \]
              2. accelerator-lowering-fma.f6465.3

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
            5. Simplified65.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
            6. Step-by-step derivation
              1. +-rgt-identityN/A

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

                \[\leadsto \color{blue}{y \cdot x} + c \]
              3. accelerator-lowering-fma.f6465.3

                \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
            7. Applied egg-rr65.3%

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

            if 2.00000000000000011e-128 < (*.f64 z t) < 4.99999999999999977e36

            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 inf

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

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

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

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

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

                \[\leadsto a \cdot \color{blue}{\left(b \cdot \frac{-1}{4}\right)} \]
              6. *-lowering-*.f6451.7

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

              \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification65.7%

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

          Alternative 8: 87.5% accurate, 1.2× speedup?

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

            1. Initial program 98.1%

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

              \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
              2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{\frac{1}{16} \cdot \left(t \cdot z\right)}\right) \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

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

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

            if -3.0000000000000002e49 < (*.f64 z t) < 5.00000000000000024e25

            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. *-commutativeN/A

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{x \cdot y + c}\right) \]
              11. accelerator-lowering-fma.f6495.4

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

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

            if 5.00000000000000024e25 < (*.f64 z t)

            1. Initial program 98.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. 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 \]
              2. +-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 \]
              3. 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 \]
              4. 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 \]
              5. *-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 \]
              6. accelerator-lowering-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 \]
              7. 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 \]
              8. *-lowering-*.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 \]
              9. 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 \]
              10. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(t \cdot \frac{1}{16}, z, \color{blue}{x \cdot y}\right) + c \]
            6. Step-by-step derivation
              1. *-lowering-*.f6487.8

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

              \[\leadsto \mathsf{fma}\left(t \cdot 0.0625, z, \color{blue}{x \cdot y}\right) + c \]
            8. Step-by-step derivation
              1. associate-+l+N/A

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{t \cdot \frac{1}{16}}, z, x \cdot y + c\right) \]
              4. accelerator-lowering-fma.f6487.8

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

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

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

          Alternative 9: 90.2% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t \cdot 0.0625, z, \mathsf{fma}\left(x, y, c\right)\right)\\ \mathbf{if}\;t \cdot z \leq -3 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, \mathsf{fma}\left(x, y, c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c)
           :precision binary64
           (let* ((t_1 (fma (* t 0.0625) z (fma x y c))))
             (if (<= (* t z) -3e+49)
               t_1
               (if (<= (* t z) 5e+25) (fma a (* b -0.25) (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((t * 0.0625), z, fma(x, y, c));
          	double tmp;
          	if ((t * z) <= -3e+49) {
          		tmp = t_1;
          	} else if ((t * z) <= 5e+25) {
          		tmp = fma(a, (b * -0.25), fma(x, y, c));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c)
          	t_1 = fma(Float64(t * 0.0625), z, fma(x, y, c))
          	tmp = 0.0
          	if (Float64(t * z) <= -3e+49)
          		tmp = t_1;
          	elseif (Float64(t * z) <= 5e+25)
          		tmp = fma(a, Float64(b * -0.25), 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[(t * 0.0625), $MachinePrecision] * z + N[(x * y + c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -3e+49], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+25], N[(a * N[(b * -0.25), $MachinePrecision] + N[(x * y + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \mathsf{fma}\left(t \cdot 0.0625, z, \mathsf{fma}\left(x, y, c\right)\right)\\
          \mathbf{if}\;t \cdot z \leq -3 \cdot 10^{+49}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+25}:\\
          \;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, \mathsf{fma}\left(x, y, c\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 z t) < -3.0000000000000002e49 or 5.00000000000000024e25 < (*.f64 z t)

            1. Initial program 98.3%

              \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. 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 \]
              2. +-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 \]
              3. 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 \]
              4. 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 \]
              5. *-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 \]
              6. accelerator-lowering-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 \]
              7. 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 \]
              8. *-lowering-*.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 \]
              9. 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 \]
              10. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(t \cdot \frac{1}{16}, z, \color{blue}{x \cdot y}\right) + c \]
            6. Step-by-step derivation
              1. *-lowering-*.f6485.2

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

              \[\leadsto \mathsf{fma}\left(t \cdot 0.0625, z, \color{blue}{x \cdot y}\right) + c \]
            8. Step-by-step derivation
              1. associate-+l+N/A

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{t \cdot \frac{1}{16}}, z, x \cdot y + c\right) \]
              4. accelerator-lowering-fma.f6485.2

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

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

            if -3.0000000000000002e49 < (*.f64 z t) < 5.00000000000000024e25

            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. *-commutativeN/A

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{x \cdot y + c}\right) \]
              11. accelerator-lowering-fma.f6495.4

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

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

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

          Alternative 10: 89.7% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(0.0625, t \cdot z, \mathsf{fma}\left(x, y, c\right)\right)\\ \mathbf{if}\;t \cdot z \leq -3 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, \mathsf{fma}\left(x, y, c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c)
           :precision binary64
           (let* ((t_1 (fma 0.0625 (* t z) (fma x y c))))
             (if (<= (* t z) -3e+49)
               t_1
               (if (<= (* t z) 5e+25) (fma a (* b -0.25) (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.0625, (t * z), fma(x, y, c));
          	double tmp;
          	if ((t * z) <= -3e+49) {
          		tmp = t_1;
          	} else if ((t * z) <= 5e+25) {
          		tmp = fma(a, (b * -0.25), fma(x, y, c));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c)
          	t_1 = fma(0.0625, Float64(t * z), fma(x, y, c))
          	tmp = 0.0
          	if (Float64(t * z) <= -3e+49)
          		tmp = t_1;
          	elseif (Float64(t * z) <= 5e+25)
          		tmp = fma(a, Float64(b * -0.25), 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.0625 * N[(t * z), $MachinePrecision] + N[(x * y + c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -3e+49], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+25], N[(a * N[(b * -0.25), $MachinePrecision] + N[(x * y + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \mathsf{fma}\left(0.0625, t \cdot z, \mathsf{fma}\left(x, y, c\right)\right)\\
          \mathbf{if}\;t \cdot z \leq -3 \cdot 10^{+49}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+25}:\\
          \;\;\;\;\mathsf{fma}\left(a, b \cdot -0.25, \mathsf{fma}\left(x, y, c\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 z t) < -3.0000000000000002e49 or 5.00000000000000024e25 < (*.f64 z t)

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

            if -3.0000000000000002e49 < (*.f64 z t) < 5.00000000000000024e25

            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. *-commutativeN/A

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{x \cdot y + c}\right) \]
              11. accelerator-lowering-fma.f6495.4

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

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

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

          Alternative 11: 85.0% accurate, 1.2× speedup?

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

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
              2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{c}\right) \]
            7. Step-by-step derivation
              1. Simplified79.7%

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

              if -2e19 < (*.f64 a b) < 1.99999999999999987e146

              1. Initial program 99.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}{\left(\frac{1}{16} \cdot \left(t \cdot z\right) + c\right)} + x \cdot y \]
                3. associate-+l+N/A

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

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

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

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

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

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

              if 1.99999999999999987e146 < (*.f64 a b)

              1. Initial program 100.0%

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

                \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
                2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(a, b \cdot \frac{-1}{4}, \color{blue}{x \cdot y}\right) \]
              7. Step-by-step derivation
                1. *-lowering-*.f6481.6

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

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

            Alternative 12: 63.3% accurate, 1.4× speedup?

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

              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 inf

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

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

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

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

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

                  \[\leadsto a \cdot \color{blue}{\left(b \cdot \frac{-1}{4}\right)} \]
                6. *-lowering-*.f6471.9

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

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

              if -1.99999999999999989e66 < (*.f64 a b) < 1.99999999999999987e146

              1. Initial program 99.1%

                \[\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} + c \]
              4. Step-by-step derivation
                1. +-rgt-identityN/A

                  \[\leadsto \color{blue}{\left(x \cdot y + 0\right)} + c \]
                2. accelerator-lowering-fma.f6455.8

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
              5. Simplified55.8%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
              6. Step-by-step derivation
                1. +-rgt-identityN/A

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

                  \[\leadsto \color{blue}{y \cdot x} + c \]
                3. accelerator-lowering-fma.f6455.8

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
              7. Applied egg-rr55.8%

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

            Alternative 13: 98.5% accurate, 1.6× speedup?

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

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

              \[\leadsto \color{blue}{\left(c + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\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 + \left(\frac{1}{16} \cdot \left(t \cdot z\right) + x \cdot y\right)\right) + \left(\mathsf{neg}\left(\frac{1}{4}\right)\right) \cdot \left(a \cdot b\right)} \]
              2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 14: 42.1% accurate, 1.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+69}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+111}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c)
             :precision binary64
             (if (<= (* x y) -1e+69) (* x y) (if (<= (* x y) 5e+111) c (* x y))))
            double code(double x, double y, double z, double t, double a, double b, double c) {
            	double tmp;
            	if ((x * y) <= -1e+69) {
            		tmp = x * y;
            	} else if ((x * y) <= 5e+111) {
            		tmp = c;
            	} else {
            		tmp = x * y;
            	}
            	return tmp;
            }
            
            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
                real(8) :: tmp
                if ((x * y) <= (-1d+69)) then
                    tmp = x * y
                else if ((x * y) <= 5d+111) then
                    tmp = c
                else
                    tmp = x * y
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b, double c) {
            	double tmp;
            	if ((x * y) <= -1e+69) {
            		tmp = x * y;
            	} else if ((x * y) <= 5e+111) {
            		tmp = c;
            	} else {
            		tmp = x * y;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c):
            	tmp = 0
            	if (x * y) <= -1e+69:
            		tmp = x * y
            	elif (x * y) <= 5e+111:
            		tmp = c
            	else:
            		tmp = x * y
            	return tmp
            
            function code(x, y, z, t, a, b, c)
            	tmp = 0.0
            	if (Float64(x * y) <= -1e+69)
            		tmp = Float64(x * y);
            	elseif (Float64(x * y) <= 5e+111)
            		tmp = c;
            	else
            		tmp = Float64(x * y);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c)
            	tmp = 0.0;
            	if ((x * y) <= -1e+69)
            		tmp = x * y;
            	elseif ((x * y) <= 5e+111)
            		tmp = c;
            	else
            		tmp = x * y;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e+69], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+111], c, N[(x * y), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+69}:\\
            \;\;\;\;x \cdot y\\
            
            \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+111}:\\
            \;\;\;\;c\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 x y) < -1.0000000000000001e69 or 4.9999999999999997e111 < (*.f64 x y)

              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. 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 \]
                2. +-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 \]
                3. 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 \]
                4. 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 \]
                5. *-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 \]
                6. accelerator-lowering-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 \]
                7. 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 \]
                8. *-lowering-*.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 \]
                9. 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 \]
                10. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{x \cdot y} \]
              6. Step-by-step derivation
                1. *-lowering-*.f6457.4

                  \[\leadsto \color{blue}{x \cdot y} \]
              7. Simplified57.4%

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

              if -1.0000000000000001e69 < (*.f64 x y) < 4.9999999999999997e111

              1. Initial program 99.1%

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

                \[\leadsto \color{blue}{c} \]
              4. Step-by-step derivation
                1. Simplified28.9%

                  \[\leadsto \color{blue}{c} \]
              5. Recombined 2 regimes into one program.
              6. Add Preprocessing

              Alternative 15: 48.8% accurate, 6.7× speedup?

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

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

                \[\leadsto \color{blue}{x \cdot y} + c \]
              4. Step-by-step derivation
                1. +-rgt-identityN/A

                  \[\leadsto \color{blue}{\left(x \cdot y + 0\right)} + c \]
                2. accelerator-lowering-fma.f6444.4

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
              5. Simplified44.4%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, 0\right)} + c \]
              6. Step-by-step derivation
                1. +-rgt-identityN/A

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

                  \[\leadsto \color{blue}{y \cdot x} + c \]
                3. accelerator-lowering-fma.f6444.4

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c\right)} \]
              7. Applied egg-rr44.4%

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

              Alternative 16: 22.6% accurate, 47.0× speedup?

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

                \[\leadsto \color{blue}{c} \]
              4. Step-by-step derivation
                1. Simplified24.0%

                  \[\leadsto \color{blue}{c} \]
                2. Add Preprocessing

                Reproduce

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