r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r \cdot \sin b}{\cos b \cdot \cos a - \log \left(e^{\sin a \cdot \sin b}\right)}double code(double r, double a, double b) {
return (r * (sin(b) / cos((a + b))));
}
double code(double r, double a, double b) {
return ((r * sin(b)) / ((cos(b) * cos(a)) - log(exp((sin(a) * sin(b))))));
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 15.1
rmApplied cos-sum0.3
rmApplied add-log-exp0.4
Taylor expanded around inf 0.3
rmApplied add-log-exp0.4
Final simplification0.4
herbie shell --seed 2020060
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))