r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r}{\mathsf{fma}\left(\cos b, \frac{\cos a}{\sin b}, -\sin a\right)}double f(double r, double a, double b) {
double r27548 = r;
double r27549 = b;
double r27550 = sin(r27549);
double r27551 = a;
double r27552 = r27551 + r27549;
double r27553 = cos(r27552);
double r27554 = r27550 / r27553;
double r27555 = r27548 * r27554;
return r27555;
}
double f(double r, double a, double b) {
double r27556 = r;
double r27557 = b;
double r27558 = cos(r27557);
double r27559 = a;
double r27560 = cos(r27559);
double r27561 = sin(r27557);
double r27562 = r27560 / r27561;
double r27563 = sin(r27559);
double r27564 = -r27563;
double r27565 = fma(r27558, r27562, r27564);
double r27566 = r27556 / r27565;
return r27566;
}



Bits error versus r



Bits error versus a



Bits error versus b
Initial program 14.7
rmApplied cos-sum0.3
Taylor expanded around inf 0.3
Simplified0.4
Taylor expanded around inf 0.4
Simplified0.4
Taylor expanded around inf 0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019304 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))