\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 r1026821 = r;
double r1026822 = b;
double r1026823 = sin(r1026822);
double r1026824 = r1026821 * r1026823;
double r1026825 = a;
double r1026826 = r1026825 + r1026822;
double r1026827 = cos(r1026826);
double r1026828 = r1026824 / r1026827;
return r1026828;
}
double f(double r, double a, double b) {
double r1026829 = r;
double r1026830 = b;
double r1026831 = sin(r1026830);
double r1026832 = cos(r1026830);
double r1026833 = a;
double r1026834 = cos(r1026833);
double r1026835 = sin(r1026833);
double r1026836 = r1026835 * r1026831;
double r1026837 = -r1026836;
double r1026838 = fma(r1026832, r1026834, r1026837);
double r1026839 = r1026831 / r1026838;
double r1026840 = r1026829 * r1026839;
return r1026840;
}



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))))