Average Error: 0.2 → 0.0
Time: 18.4s
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 r7645554 = a;
        double r7645555 = r7645554 * r7645554;
        double r7645556 = b;
        double r7645557 = r7645556 * r7645556;
        double r7645558 = r7645555 + r7645557;
        double r7645559 = 2.0;
        double r7645560 = pow(r7645558, r7645559);
        double r7645561 = 4.0;
        double r7645562 = r7645561 * r7645557;
        double r7645563 = r7645560 + r7645562;
        double r7645564 = 1.0;
        double r7645565 = r7645563 - r7645564;
        return r7645565;
}

double f(double a, double b) {
        double r7645566 = b;
        double r7645567 = r7645566 * r7645566;
        double r7645568 = a;
        double r7645569 = r7645568 * r7645568;
        double r7645570 = r7645567 + r7645569;
        double r7645571 = sqrt(r7645570);
        double r7645572 = 4.0;
        double r7645573 = pow(r7645571, r7645572);
        double r7645574 = -1.0;
        double r7645575 = r7645573 + r7645574;
        double r7645576 = -4.0;
        double r7645577 = r7645576 * r7645567;
        double r7645578 = r7645575 - r7645577;
        return r7645578;
}

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(\left(b \cdot b + a \cdot a\right) \cdot \color{blue}{\left(\sqrt{b \cdot b + a \cdot a} \cdot \sqrt{b \cdot b + a \cdot a}\right)} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  5. Applied associate-*r*0.1

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

    \[\leadsto \left(\left(\left(b \cdot b + a \cdot a\right) \cdot \sqrt{b \cdot b + a \cdot a}\right) \cdot \color{blue}{{\left(\sqrt{b \cdot b + a \cdot a}\right)}^{1}} + -1\right) - -4 \cdot \left(b \cdot b\right)\]
  8. Applied add-sqr-sqrt0.1

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

    \[\leadsto \left(\color{blue}{{\left(\sqrt{b \cdot b + a \cdot a}\right)}^{3}} \cdot {\left(\sqrt{b \cdot b + a \cdot a}\right)}^{1} + -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(3 + 1\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 2019168 
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (26)"
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b))) 1))