-\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)
\begin{array}{l}
t_0 := \frac{\pi}{4} \cdot f\\
t_1 := \sqrt{e^{t_0} + e^{-t_0}}\\
-\frac{\log \left(\frac{t_1}{2} \cdot \frac{t_1}{\sinh t_0}\right)}{\frac{\pi}{4}}
\end{array}
(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 (let* ((t_0 (* (/ PI 4.0) f)) (t_1 (sqrt (+ (exp t_0) (exp (- t_0)))))) (- (/ (log (* (/ t_1 2.0) (/ t_1 (sinh t_0)))) (/ PI 4.0)))))
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) {
double t_0 = (((double) M_PI) / 4.0) * f;
double t_1 = sqrt(exp(t_0) + exp(-t_0));
return -(log((t_1 / 2.0) * (t_1 / sinh(t_0))) / (((double) M_PI) / 4.0));
}



Bits error versus f
Results
Initial program 61.3
Applied sinh-undef_binary642.0
Applied add-sqr-sqrt_binary642.0
Applied times-frac_binary642.0
Applied associate-*l/_binary641.9
Final simplification1.9
herbie shell --seed 2022067
(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)))))))))