-\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)-1 \cdot \frac{\log \left(\frac{\cosh \left(\frac{\pi}{4} \cdot f\right)}{\sinh \left(\frac{\pi}{4} \cdot f\right)}\right)}{\frac{\pi}{4}}(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 (- (* 1.0 (/ (log (/ (cosh (* (/ PI 4.0) f)) (sinh (* (/ PI 4.0) f)))) (/ PI 4.0)))))
double code(double f) {
return ((double) -(((double) ((1.0 / (((double) M_PI) / 4.0)) * ((double) log((((double) (((double) exp(((double) ((((double) M_PI) / 4.0) * f)))) + ((double) exp(((double) -(((double) ((((double) M_PI) / 4.0) * f)))))))) / ((double) (((double) exp(((double) ((((double) M_PI) / 4.0) * f)))) - ((double) exp(((double) -(((double) ((((double) M_PI) / 4.0) * f)))))))))))))));
}
double code(double f) {
return ((double) -(((double) (1.0 * (((double) log((((double) cosh(((double) ((((double) M_PI) / 4.0) * f)))) / ((double) sinh(((double) ((((double) M_PI) / 4.0) * f))))))) / (((double) M_PI) / 4.0))))));
}



Bits error versus f
Results
Initial program 61.3
rmApplied sinh-undef_binary641.8
Applied associate-/r*_binary641.8
Simplified1.8
rmApplied div-inv_binary641.8
Applied associate-*l*_binary641.8
Simplified1.7
Final simplification1.7
herbie shell --seed 2020204
(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)))))))))