Average Error: 14.6 → 0.3
Time: 11.8s
Precision: 64
\[\left(\frac{\pi}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
\[\frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{\frac{b - a}{\sqrt{1}}}{\frac{\sqrt{1}}{a} - \frac{\sqrt{1}}{b}}}\]
\left(\frac{\pi}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)
\frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{\frac{b - a}{\sqrt{1}}}{\frac{\sqrt{1}}{a} - \frac{\sqrt{1}}{b}}}
double f(double a, double b) {
        double r62272 = atan2(1.0, 0.0);
        double r62273 = 2.0;
        double r62274 = r62272 / r62273;
        double r62275 = 1.0;
        double r62276 = b;
        double r62277 = r62276 * r62276;
        double r62278 = a;
        double r62279 = r62278 * r62278;
        double r62280 = r62277 - r62279;
        double r62281 = r62275 / r62280;
        double r62282 = r62274 * r62281;
        double r62283 = r62275 / r62278;
        double r62284 = r62275 / r62276;
        double r62285 = r62283 - r62284;
        double r62286 = r62282 * r62285;
        return r62286;
}

double f(double a, double b) {
        double r62287 = atan2(1.0, 0.0);
        double r62288 = 2.0;
        double r62289 = r62287 / r62288;
        double r62290 = 1.0;
        double r62291 = cbrt(r62290);
        double r62292 = r62291 * r62291;
        double r62293 = b;
        double r62294 = a;
        double r62295 = r62293 + r62294;
        double r62296 = r62292 / r62295;
        double r62297 = r62289 * r62296;
        double r62298 = r62297 * r62291;
        double r62299 = r62293 - r62294;
        double r62300 = sqrt(r62290);
        double r62301 = r62299 / r62300;
        double r62302 = r62300 / r62294;
        double r62303 = r62300 / r62293;
        double r62304 = r62302 - r62303;
        double r62305 = r62301 / r62304;
        double r62306 = r62298 / r62305;
        return r62306;
}

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 14.6

    \[\left(\frac{\pi}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
  2. Using strategy rm
  3. Applied difference-of-squares9.6

    \[\leadsto \left(\frac{\pi}{2} \cdot \frac{1}{\color{blue}{\left(b + a\right) \cdot \left(b - a\right)}}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
  4. Applied add-cube-cbrt9.6

    \[\leadsto \left(\frac{\pi}{2} \cdot \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\left(b + a\right) \cdot \left(b - a\right)}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
  5. Applied times-frac9.1

    \[\leadsto \left(\frac{\pi}{2} \cdot \color{blue}{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a} \cdot \frac{\sqrt[3]{1}}{b - a}\right)}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
  6. Applied associate-*r*9.1

    \[\leadsto \color{blue}{\left(\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \frac{\sqrt[3]{1}}{b - a}\right)} \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
  7. Using strategy rm
  8. Applied associate-*r/9.1

    \[\leadsto \color{blue}{\frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{b - a}} \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\]
  9. Applied associate-*l/0.3

    \[\leadsto \color{blue}{\frac{\left(\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)}{b - a}}\]
  10. Using strategy rm
  11. Applied associate-/l*0.3

    \[\leadsto \color{blue}{\frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\frac{1}{a} - \frac{1}{b}}}}\]
  12. Using strategy rm
  13. Applied *-un-lft-identity0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\frac{1}{a} - \frac{1}{\color{blue}{1 \cdot b}}}}\]
  14. Applied add-sqr-sqrt0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\frac{1}{a} - \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot b}}}\]
  15. Applied times-frac0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\frac{1}{a} - \color{blue}{\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{b}}}}\]
  16. Applied *-un-lft-identity0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\frac{1}{\color{blue}{1 \cdot a}} - \frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{b}}}\]
  17. Applied add-sqr-sqrt0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot a} - \frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{b}}}\]
  18. Applied times-frac0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\color{blue}{\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{a}} - \frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{b}}}\]
  19. Applied distribute-lft-out--0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{b - a}{\color{blue}{\frac{\sqrt{1}}{1} \cdot \left(\frac{\sqrt{1}}{a} - \frac{\sqrt{1}}{b}\right)}}}\]
  20. Applied associate-/r*0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\color{blue}{\frac{\frac{b - a}{\frac{\sqrt{1}}{1}}}{\frac{\sqrt{1}}{a} - \frac{\sqrt{1}}{b}}}}\]
  21. Simplified0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{\color{blue}{\frac{b - a}{\sqrt{1}}}}{\frac{\sqrt{1}}{a} - \frac{\sqrt{1}}{b}}}\]
  22. Final simplification0.3

    \[\leadsto \frac{\left(\frac{\pi}{2} \cdot \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{b + a}\right) \cdot \sqrt[3]{1}}{\frac{\frac{b - a}{\sqrt{1}}}{\frac{\sqrt{1}}{a} - \frac{\sqrt{1}}{b}}}\]

Reproduce

herbie shell --seed 2020042 
(FPCore (a b)
  :name "NMSE Section 6.1 mentioned, B"
  :precision binary64
  (* (* (/ PI 2) (/ 1 (- (* b b) (* a a)))) (- (/ 1 a) (/ 1 b))))