Average Error: 0.2 → 0.5
Time: 47.5s
Precision: 64
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
\[\left(\sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)} \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\]
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1
\left(\sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)} \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}
double f(double a, double b) {
        double r11718517 = a;
        double r11718518 = r11718517 * r11718517;
        double r11718519 = b;
        double r11718520 = r11718519 * r11718519;
        double r11718521 = r11718518 + r11718520;
        double r11718522 = 2.0;
        double r11718523 = pow(r11718521, r11718522);
        double r11718524 = 4.0;
        double r11718525 = 1.0;
        double r11718526 = r11718525 + r11718517;
        double r11718527 = r11718518 * r11718526;
        double r11718528 = 3.0;
        double r11718529 = r11718528 * r11718517;
        double r11718530 = r11718525 - r11718529;
        double r11718531 = r11718520 * r11718530;
        double r11718532 = r11718527 + r11718531;
        double r11718533 = r11718524 * r11718532;
        double r11718534 = r11718523 + r11718533;
        double r11718535 = r11718534 - r11718525;
        return r11718535;
}

double f(double a, double b) {
        double r11718536 = 4.0;
        double r11718537 = a;
        double r11718538 = r11718537 * r11718537;
        double r11718539 = 1.0;
        double r11718540 = r11718537 + r11718539;
        double r11718541 = 3.0;
        double r11718542 = r11718537 * r11718541;
        double r11718543 = r11718539 - r11718542;
        double r11718544 = b;
        double r11718545 = r11718544 * r11718544;
        double r11718546 = r11718543 * r11718545;
        double r11718547 = fma(r11718538, r11718540, r11718546);
        double r11718548 = fma(r11718544, r11718544, r11718538);
        double r11718549 = 2.0;
        double r11718550 = pow(r11718548, r11718549);
        double r11718551 = r11718550 - r11718539;
        double r11718552 = fma(r11718536, r11718547, r11718551);
        double r11718553 = cbrt(r11718552);
        double r11718554 = r11718553 * r11718553;
        double r11718555 = r11718554 * r11718553;
        return r11718555;
}

Error

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 0.2

    \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  2. Simplified0.2

    \[\leadsto \color{blue}{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.5

    \[\leadsto \color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)} \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}}\]
  5. Final simplification0.5

    \[\leadsto \left(\sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)} \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(4, \mathsf{fma}\left(a \cdot a, a + 1, \left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right)\right), {\left(\mathsf{fma}\left(b, b, a \cdot a\right)\right)}^{2} - 1\right)}\]

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (25)"
  (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (+ (* (* a a) (+ 1.0 a)) (* (* b b) (- 1.0 (* 3.0 a)))))) 1.0))