\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}{2}}{a + b} \cdot \left(\left(\frac{1}{a} - \frac{1}{b}\right) \cdot \frac{1}{b - a}\right)(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 2.0) (+ a b)) (* (- (/ 1.0 a) (/ 1.0 b)) (/ 1.0 (- b a)))))
double code(double a, double b) {
return ((double) (((double) ((((double) M_PI) / 2.0) * (1.0 / ((double) (((double) (b * b)) - ((double) (a * a))))))) * ((double) ((1.0 / a) - (1.0 / b)))));
}
double code(double a, double b) {
return ((double) (((((double) M_PI) / 2.0) / ((double) (a + b))) * ((double) (((double) ((1.0 / a) - (1.0 / b))) * (1.0 / ((double) (b - a)))))));
}



Bits error versus a



Bits error versus b
Results
Initial program Error: 14.8 bits
SimplifiedError: 14.8 bits
rmApplied difference-of-squaresError: 9.6 bits
Applied *-un-lft-identityError: 9.6 bits
Applied times-fracError: 9.2 bits
Applied associate-*l*Error: 0.4 bits
SimplifiedError: 0.4 bits
rmApplied associate-*r*Error: 0.4 bits
SimplifiedError: 0.3 bits
Final simplificationError: 0.3 bits
herbie shell --seed 2020204
(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))))