Average Error: 0.2 → 0.5
Time: 12.0s
Precision: 64
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
\[\left(\sqrt[3]{\mathsf{fma}\left(4, b \cdot b, {\left(\mathsf{fma}\left(a, a, b \cdot b\right)\right)}^{2}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(4, b \cdot b, {\left(\mathsf{fma}\left(a, a, b \cdot b\right)\right)}^{2}\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(4, b \cdot b, {\left(\mathsf{fma}\left(a, a, b \cdot b\right)\right)}^{2}\right)} - 1\]
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1
\left(\sqrt[3]{\mathsf{fma}\left(4, b \cdot b, {\left(\mathsf{fma}\left(a, a, b \cdot b\right)\right)}^{2}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(4, b \cdot b, {\left(\mathsf{fma}\left(a, a, b \cdot b\right)\right)}^{2}\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(4, b \cdot b, {\left(\mathsf{fma}\left(a, a, b \cdot b\right)\right)}^{2}\right)} - 1
double f(double a, double b) {
        double r207412 = a;
        double r207413 = r207412 * r207412;
        double r207414 = b;
        double r207415 = r207414 * r207414;
        double r207416 = r207413 + r207415;
        double r207417 = 2.0;
        double r207418 = pow(r207416, r207417);
        double r207419 = 4.0;
        double r207420 = r207419 * r207415;
        double r207421 = r207418 + r207420;
        double r207422 = 1.0;
        double r207423 = r207421 - r207422;
        return r207423;
}

double f(double a, double b) {
        double r207424 = 4.0;
        double r207425 = b;
        double r207426 = r207425 * r207425;
        double r207427 = a;
        double r207428 = fma(r207427, r207427, r207426);
        double r207429 = 2.0;
        double r207430 = pow(r207428, r207429);
        double r207431 = fma(r207424, r207426, r207430);
        double r207432 = cbrt(r207431);
        double r207433 = r207432 * r207432;
        double r207434 = r207433 * r207432;
        double r207435 = 1.0;
        double r207436 = r207434 - r207435;
        return r207436;
}

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(b \cdot b\right)\right) - 1\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.5

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

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

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

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

Reproduce

herbie shell --seed 2020045 +o rules:numerics
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (26)"
  :precision binary64
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b))) 1))