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



Bits error versus x



Bits error versus y
Results
Initial program 0.1
rmApplied expm1-log1p-u0.1
Final simplification0.1
herbie shell --seed 2020057 +o rules:numerics
(FPCore (x y)
:name "Linear.Quaternion:$cexp from linear-1.19.1.3"
:precision binary64
(* x (/ (sin y) y)))