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



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 14.9
Simplified14.9
rmApplied cos-sum0.3
Taylor expanded around inf 0.3
Simplified0.4
Final simplification0.4
herbie shell --seed 2020199
(FPCore (r a b)
:name "rsin A"
:precision binary64
(/ (* r (sin b)) (cos (+ a b))))