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



Bits error versus a



Bits error versus b
Results
Initial program 14.1
rmApplied difference-of-squares9.3
Applied associate-/r*8.9
Applied associate-*r/8.9
Applied associate-*l/0.3
rmApplied associate-*l*0.3
Simplified0.3
rmApplied *-commutative0.3
Applied associate-/l*0.3
Final simplification0.3
herbie shell --seed 2020071 +o rules:numerics
(FPCore (a b)
:name "NMSE Section 6.1 mentioned, B"
:precision binary64
(* (* (/ PI 2) (/ 1 (- (* b b) (* a a)))) (- (/ 1 a) (/ 1 b))))