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








Bits error versus f
Results
| Alternative 1 | |
|---|---|
| Error | 2.3 |
| Cost | 7424 |
| Alternative 2 | |
|---|---|
| Error | 2.7 |
| Cost | 6976 |
| Alternative 3 | |
|---|---|
| Error | 55.2 |
| Cost | 64 |
| Alternative 4 | |
|---|---|
| Error | 60.8 |
| Cost | 64 |
| Alternative 5 | |
|---|---|
| Error | 63.0 |
| Cost | 64 |

Initial program 61.5
rmApplied sinh-undef_binary642.0
Applied cosh-undef_binary642.0
Applied times-frac_binary642.0
Simplified2.0
Simplified2.0
Final simplification2.0
herbie shell --seed 2021044
(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)))))))))