\frac{r \cdot \sin b}{\cos \left(a + b\right)}
\frac{r \cdot \sin b}{\cos a \cdot \cos b - \sin b \cdot \sin a}
(FPCore (r a b) :precision binary64 (/ (* r (sin b)) (cos (+ a b))))
(FPCore (r a b) :precision binary64 (/ (* r (sin b)) (- (* (cos a) (cos b)) (* (sin b) (sin a)))))
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(a) * cos(b)) - (sin(b) * sin(a)));
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 14.6
Applied egg-rr0.3
Applied egg-rr0.3
Taylor expanded in b around inf 0.3
Final simplification0.3
herbie shell --seed 2022129
(FPCore (r a b)
:name "rsin A"
:precision binary64
(/ (* r (sin b)) (cos (+ a b))))