r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r}{\frac{\cos a \cdot \cos b}{\sin b} - \sin a}double f(double r, double a, double b) {
double r25466 = r;
double r25467 = b;
double r25468 = sin(r25467);
double r25469 = a;
double r25470 = r25469 + r25467;
double r25471 = cos(r25470);
double r25472 = r25468 / r25471;
double r25473 = r25466 * r25472;
return r25473;
}
double f(double r, double a, double b) {
double r25474 = r;
double r25475 = a;
double r25476 = cos(r25475);
double r25477 = b;
double r25478 = cos(r25477);
double r25479 = r25476 * r25478;
double r25480 = sin(r25477);
double r25481 = r25479 / r25480;
double r25482 = sin(r25475);
double r25483 = r25481 - r25482;
double r25484 = r25474 / r25483;
return r25484;
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 14.8
rmApplied cos-sum0.3
rmApplied clear-num0.4
Simplified0.4
rmApplied pow10.4
Applied pow10.4
Applied pow-prod-down0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019303
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))