\frac{\sin x \cdot \sinh y}{x}
\mathsf{expm1}\left(\mathsf{log1p}\left(\sinh y \cdot \frac{\sin x}{x}\right)\right)
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
(FPCore (x y) :precision binary64 (expm1 (log1p (* (sinh y) (/ (sin x) x)))))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
double code(double x, double y) {
return expm1(log1p((sinh(y) * (sin(x) / x))));
}




Bits error versus x




Bits error versus y
Results
| Original | 13.9 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 13.9
Applied associate-/l*_binary640.8
Applied expm1-log1p-u_binary640.9
Simplified0.3
Final simplification0.3
herbie shell --seed 2022125
(FPCore (x y)
:name "Linear.Quaternion:$ccosh from linear-1.19.1.3"
:precision binary64
:herbie-target
(* (sin x) (/ (sinh y) x))
(/ (* (sin x) (sinh y)) x))