r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r \cdot \sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}double f(double r, double a, double b) {
double r29054 = r;
double r29055 = b;
double r29056 = sin(r29055);
double r29057 = a;
double r29058 = r29057 + r29055;
double r29059 = cos(r29058);
double r29060 = r29056 / r29059;
double r29061 = r29054 * r29060;
return r29061;
}
double f(double r, double a, double b) {
double r29062 = r;
double r29063 = b;
double r29064 = sin(r29063);
double r29065 = r29062 * r29064;
double r29066 = a;
double r29067 = cos(r29066);
double r29068 = cos(r29063);
double r29069 = r29067 * r29068;
double r29070 = sin(r29066);
double r29071 = r29070 * r29064;
double r29072 = r29069 - r29071;
double r29073 = r29065 / r29072;
return r29073;
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 14.7
rmApplied cos-sum0.3
rmApplied clear-num0.4
rmApplied associate-/r/0.4
Applied associate-*r*0.4
Simplified0.3
rmApplied flip--0.4
Final simplification0.3
herbie shell --seed 2019304
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))