\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 r384899 = x;
double r384900 = sin(r384899);
double r384901 = y;
double r384902 = sinh(r384901);
double r384903 = r384900 * r384902;
double r384904 = r384903 / r384899;
return r384904;
}
double f(double x, double y) {
double r384905 = x;
double r384906 = sin(r384905);
double r384907 = r384906 / r384905;
double r384908 = y;
double r384909 = sinh(r384908);
double r384910 = r384907 * r384909;
double r384911 = log1p(r384910);
double r384912 = expm1(r384911);
return r384912;
}




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))