Average Error: 0.2 → 0.0
Time: 19.3s
Precision: 64
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
\[\left({\left(\sqrt{b \cdot b + a \cdot a}\right)}^{4} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1
\left({\left(\sqrt{b \cdot b + a \cdot a}\right)}^{4} + -1\right) - -4 \cdot \left(b \cdot b\right)
double f(double a, double b) {
        double r8522738 = a;
        double r8522739 = r8522738 * r8522738;
        double r8522740 = b;
        double r8522741 = r8522740 * r8522740;
        double r8522742 = r8522739 + r8522741;
        double r8522743 = 2.0;
        double r8522744 = pow(r8522742, r8522743);
        double r8522745 = 4.0;
        double r8522746 = r8522745 * r8522741;
        double r8522747 = r8522744 + r8522746;
        double r8522748 = 1.0;
        double r8522749 = r8522747 - r8522748;
        return r8522749;
}

double f(double a, double b) {
        double r8522750 = b;
        double r8522751 = r8522750 * r8522750;
        double r8522752 = a;
        double r8522753 = r8522752 * r8522752;
        double r8522754 = r8522751 + r8522753;
        double r8522755 = sqrt(r8522754);
        double r8522756 = 4.0;
        double r8522757 = pow(r8522755, r8522756);
        double r8522758 = -1.0;
        double r8522759 = r8522757 + r8522758;
        double r8522760 = -4.0;
        double r8522761 = r8522760 * r8522751;
        double r8522762 = r8522759 - r8522761;
        return r8522762;
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Simplified0.2

    \[\leadsto \color{blue}{\left(\left(b \cdot b + a \cdot a\right) \cdot \left(b \cdot b + a \cdot a\right) + -1\right) - -4 \cdot \left(b \cdot b\right)}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.2

    \[\leadsto \left(\color{blue}{\left(\sqrt{b \cdot b + a \cdot a} \cdot \sqrt{b \cdot b + a \cdot a}\right)} \cdot \left(b \cdot b + a \cdot a\right) + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  5. Applied associate-*l*0.1

    \[\leadsto \left(\color{blue}{\sqrt{b \cdot b + a \cdot a} \cdot \left(\sqrt{b \cdot b + a \cdot a} \cdot \left(b \cdot b + a \cdot a\right)\right)} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt0.1

    \[\leadsto \left(\sqrt{b \cdot b + a \cdot a} \cdot \left(\sqrt{b \cdot b + a \cdot a} \cdot \color{blue}{\left(\sqrt{b \cdot b + a \cdot a} \cdot \sqrt{b \cdot b + a \cdot a}\right)}\right) + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  8. Applied cube-unmult0.1

    \[\leadsto \left(\sqrt{b \cdot b + a \cdot a} \cdot \color{blue}{{\left(\sqrt{b \cdot b + a \cdot a}\right)}^{3}} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  9. Applied pow10.1

    \[\leadsto \left(\color{blue}{{\left(\sqrt{b \cdot b + a \cdot a}\right)}^{1}} \cdot {\left(\sqrt{b \cdot b + a \cdot a}\right)}^{3} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  10. Applied pow-prod-up0.0

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

    \[\leadsto \left({\left(\sqrt{b \cdot b + a \cdot a}\right)}^{\color{blue}{4}} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  12. Final simplification0.0

    \[\leadsto \left({\left(\sqrt{b \cdot b + a \cdot a}\right)}^{4} + -1\right) - -4 \cdot \left(b \cdot b\right)\]

Reproduce

herbie shell --seed 2019163 
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (26)"
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b))) 1))