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



Bits error versus f
Results
Initial program Error: 61.5 bits
rmApplied sinh-undefError: 2.0 bits
Applied associate-/r*Error: 2.0 bits
SimplifiedError: 2.0 bits
rmApplied add-sqr-sqrtError: 2.0 bits
Applied associate-/r*Error: 2.0 bits
Final simplificationError: 2.0 bits
herbie shell --seed 2020205
(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)))))))))