\frac{r \cdot \sin b}{\cos \left(a + b\right)}\frac{r}{\mathsf{fma}\left(\cos a, \cos b, -\sin b \cdot \sin a\right)} \cdot \sin bdouble f(double r, double a, double b) {
double r19203 = r;
double r19204 = b;
double r19205 = sin(r19204);
double r19206 = r19203 * r19205;
double r19207 = a;
double r19208 = r19207 + r19204;
double r19209 = cos(r19208);
double r19210 = r19206 / r19209;
return r19210;
}
double f(double r, double a, double b) {
double r19211 = r;
double r19212 = a;
double r19213 = cos(r19212);
double r19214 = b;
double r19215 = cos(r19214);
double r19216 = sin(r19214);
double r19217 = sin(r19212);
double r19218 = r19216 * r19217;
double r19219 = -r19218;
double r19220 = fma(r19213, r19215, r19219);
double r19221 = r19211 / r19220;
double r19222 = r19221 * r19216;
return r19222;
}



Bits error versus r



Bits error versus a



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