\left(\frac{\pi}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)\frac{\frac{\pi \cdot 0.5}{a + b}}{a \cdot b}(FPCore (a b) :precision binary64 (* (* (/ PI 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))
(FPCore (a b) :precision binary64 (/ (/ (* PI 0.5) (+ a b)) (* a b)))
double code(double a, double b) {
return ((((double) M_PI) / 2.0) * (1.0 / ((b * b) - (a * a)))) * ((1.0 / a) - (1.0 / b));
}
double code(double a, double b) {
return ((((double) M_PI) * 0.5) / (a + b)) / (a * b);
}



Bits error versus a



Bits error versus b
Results
Initial program 14.7
Simplified14.6
rmApplied difference-of-squares_binary64_7299.8
Applied *-un-lft-identity_binary64_7609.8
Applied times-frac_binary64_7669.3
Applied associate-*l*_binary64_7010.3
Simplified0.3
Taylor expanded around 0 0.3
rmApplied associate-*r/_binary64_7020.3
Applied associate-*r/_binary64_7020.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2021032
(FPCore (a b)
:name "NMSE Section 6.1 mentioned, B"
:precision binary64
(* (* (/ PI 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))