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



Bits error versus f
Results
Initial program Error: 61.3 bits
rmApplied sinh-undefError: 1.8 bits
Applied associate-/r*Error: 1.8 bits
SimplifiedError: 1.8 bits
rmApplied add-sqr-sqrtError: 2.1 bits
Applied associate-*l*Error: 1.8 bits
SimplifiedError: 1.8 bits
Final simplificationError: 1.8 bits
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)))))))))