\frac{r \cdot \sin b}{\cos \left(a + b\right)}\sin b \cdot \frac{r}{\cos a \cdot \cos b - \sin b \cdot \sin a}double f(double r, double a, double b) {
double r494292 = r;
double r494293 = b;
double r494294 = sin(r494293);
double r494295 = r494292 * r494294;
double r494296 = a;
double r494297 = r494296 + r494293;
double r494298 = cos(r494297);
double r494299 = r494295 / r494298;
return r494299;
}
double f(double r, double a, double b) {
double r494300 = b;
double r494301 = sin(r494300);
double r494302 = r;
double r494303 = a;
double r494304 = cos(r494303);
double r494305 = cos(r494300);
double r494306 = r494304 * r494305;
double r494307 = sin(r494303);
double r494308 = r494301 * r494307;
double r494309 = r494306 - r494308;
double r494310 = r494302 / r494309;
double r494311 = r494301 * r494310;
return r494311;
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 14.9
rmApplied cos-sum0.3
rmApplied associate-/l*0.4
rmApplied div-inv0.4
rmApplied associate-*r/0.4
Applied associate-/r/0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019152 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), A"
(/ (* r (sin b)) (cos (+ a b))))