r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r \cdot \sin b}{\cos b \cdot \cos a - \sin a \cdot \sin b}double f(double r, double a, double b) {
double r25857 = r;
double r25858 = b;
double r25859 = sin(r25858);
double r25860 = a;
double r25861 = r25860 + r25858;
double r25862 = cos(r25861);
double r25863 = r25859 / r25862;
double r25864 = r25857 * r25863;
return r25864;
}
double f(double r, double a, double b) {
double r25865 = r;
double r25866 = b;
double r25867 = sin(r25866);
double r25868 = r25865 * r25867;
double r25869 = cos(r25866);
double r25870 = a;
double r25871 = cos(r25870);
double r25872 = r25869 * r25871;
double r25873 = sin(r25870);
double r25874 = r25873 * r25867;
double r25875 = r25872 - r25874;
double r25876 = r25868 / r25875;
return r25876;
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 14.7
rmApplied cos-sum0.3
rmApplied add-cbrt-cube0.4
Applied add-cbrt-cube0.4
Applied cbrt-unprod0.4
Simplified0.4
rmApplied *-un-lft-identity0.4
Applied associate-*l*0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2019325 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))