\frac{\sin x \cdot \sinh y}{x}\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin x}{x} \cdot \sinh y\right)\right)double f(double x, double y) {
double r335770 = x;
double r335771 = sin(r335770);
double r335772 = y;
double r335773 = sinh(r335772);
double r335774 = r335771 * r335773;
double r335775 = r335774 / r335770;
return r335775;
}
double f(double x, double y) {
double r335776 = x;
double r335777 = sin(r335776);
double r335778 = r335777 / r335776;
double r335779 = y;
double r335780 = sinh(r335779);
double r335781 = r335778 * r335780;
double r335782 = log1p(r335781);
double r335783 = expm1(r335782);
return r335783;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 14.4
rmApplied associate-/l*0.8
rmApplied clear-num0.9
rmApplied expm1-log1p-u1.1
Simplified0.3
Final simplification0.3
herbie shell --seed 2019303 +o rules:numerics
(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))