r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r}{\mathsf{fma}\left(\frac{\cos b}{\sin b}, \cos a, -\sin a\right)}double f(double r, double a, double b) {
double r25434 = r;
double r25435 = b;
double r25436 = sin(r25435);
double r25437 = a;
double r25438 = r25437 + r25435;
double r25439 = cos(r25438);
double r25440 = r25436 / r25439;
double r25441 = r25434 * r25440;
return r25441;
}
double f(double r, double a, double b) {
double r25442 = r;
double r25443 = b;
double r25444 = cos(r25443);
double r25445 = sin(r25443);
double r25446 = r25444 / r25445;
double r25447 = a;
double r25448 = cos(r25447);
double r25449 = sin(r25447);
double r25450 = -r25449;
double r25451 = fma(r25446, r25448, r25450);
double r25452 = r25442 / r25451;
return r25452;
}



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
rmApplied add-cube-cbrt0.5
Applied add-sqr-sqrt32.4
Applied prod-diff32.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019323 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))