-\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)\frac{\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 -4}{\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))))
-4.0)
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))) * -4.0) / ((double) M_PI);
}



Bits error versus f
Results
Initial program 61.6
Simplified61.6
Taylor expanded around 0 2.6
Simplified2.6
rmApplied associate-*r/_binary642.5
Final simplification2.5
herbie shell --seed 2021027
(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)))))))))