r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r}{\frac{\mathsf{fma}\left(\cos a, \cos b, -\sin a \cdot \sin b\right)}{\sin b}}double f(double r, double a, double b) {
double r18580 = r;
double r18581 = b;
double r18582 = sin(r18581);
double r18583 = a;
double r18584 = r18583 + r18581;
double r18585 = cos(r18584);
double r18586 = r18582 / r18585;
double r18587 = r18580 * r18586;
return r18587;
}
double f(double r, double a, double b) {
double r18588 = r;
double r18589 = a;
double r18590 = cos(r18589);
double r18591 = b;
double r18592 = cos(r18591);
double r18593 = sin(r18589);
double r18594 = sin(r18591);
double r18595 = r18593 * r18594;
double r18596 = -r18595;
double r18597 = fma(r18590, r18592, r18596);
double r18598 = r18597 / r18594;
double r18599 = r18588 / r18598;
return r18599;
}



Bits error versus r



Bits error versus a



Bits error versus b
Initial program 15.0
rmApplied cos-sum0.3
rmApplied associate-*r/0.3
rmApplied associate-/l*0.4
rmApplied fma-neg0.4
Final simplification0.4
herbie shell --seed 2020089 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))