\frac{r \cdot \sin b}{\cos \left(a + b\right)}r \cdot \frac{\sin b}{\mathsf{fma}\left(\cos b, \cos a, -\sin a \cdot \sin b\right)}double f(double r, double a, double b) {
double r1026818 = r;
double r1026819 = b;
double r1026820 = sin(r1026819);
double r1026821 = r1026818 * r1026820;
double r1026822 = a;
double r1026823 = r1026822 + r1026819;
double r1026824 = cos(r1026823);
double r1026825 = r1026821 / r1026824;
return r1026825;
}
double f(double r, double a, double b) {
double r1026826 = r;
double r1026827 = b;
double r1026828 = sin(r1026827);
double r1026829 = cos(r1026827);
double r1026830 = a;
double r1026831 = cos(r1026830);
double r1026832 = sin(r1026830);
double r1026833 = r1026832 * r1026828;
double r1026834 = -r1026833;
double r1026835 = fma(r1026829, r1026831, r1026834);
double r1026836 = r1026828 / r1026835;
double r1026837 = r1026826 * r1026836;
return r1026837;
}



Bits error versus r



Bits error versus a



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