-\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)\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{-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.3
Simplified61.3
Taylor expanded around 0 2.9
Simplified2.9
Final simplification2.9
herbie shell --seed 2021166
(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)))))))))