-\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{e^{\frac{\pi}{4} \cdot f} - e^{-\frac{\pi}{4} \cdot f}}\right)\left(\log \left(\frac{e^{\frac{\pi}{4} \cdot f} + {\left(e^{-0.25}\right)}^{\left(\pi \cdot f\right)}}{f \cdot \left(\pi \cdot 0.5\right)}\right) \cdot \frac{1}{\sqrt{\pi}}\right) \cdot \frac{-4}{\sqrt{\pi}}(FPCore (f)
:precision binary64
(-
(*
(/ 1.0 (/ PI 4.0))
(log
(/
(+ (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f))))
(- (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f)))))))))(FPCore (f)
:precision binary64
(*
(*
(log
(/ (+ (exp (* (/ PI 4.0) f)) (pow (exp -0.25) (* PI f))) (* f (* PI 0.5))))
(/ 1.0 (sqrt PI)))
(/ -4.0 (sqrt PI))))double code(double f) {
return -((1.0 / (((double) M_PI) / 4.0)) * log((exp((((double) M_PI) / 4.0) * f) + exp(-((((double) M_PI) / 4.0) * f))) / (exp((((double) M_PI) / 4.0) * f) - exp(-((((double) M_PI) / 4.0) * f)))));
}
double code(double f) {
return (log((exp((((double) M_PI) / 4.0) * f) + pow(exp(-0.25), (((double) M_PI) * f))) / (f * (((double) M_PI) * 0.5))) * (1.0 / sqrt((double) M_PI))) * (-4.0 / sqrt((double) M_PI));
}



Bits error versus f
Results
Initial program 61.3
Simplified61.3
Taylor expanded around 0 2.6
Simplified2.6
rmApplied add-sqr-sqrt_binary643.5
Applied *-un-lft-identity_binary643.5
Applied times-frac_binary642.9
Applied associate-*r*_binary642.6
Final simplification2.6
herbie shell --seed 2021175
(FPCore (f)
:name "VandenBroeck and Keller, Equation (20)"
:precision binary64
(- (* (/ 1.0 (/ PI 4.0)) (log (/ (+ (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f)))) (- (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f)))))))))