r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r \cdot \sin b}{\frac{\mathsf{fma}\left(\cos a, \cos b, \sin b \cdot \sin a\right) \cdot \left(\cos a \cdot \cos b - \sin b \cdot \sin a\right)}{\mathsf{fma}\left(\cos a, \cos b, \sin b \cdot \sin a\right)}}double f(double r, double a, double b) {
double r27250 = r;
double r27251 = b;
double r27252 = sin(r27251);
double r27253 = a;
double r27254 = r27253 + r27251;
double r27255 = cos(r27254);
double r27256 = r27252 / r27255;
double r27257 = r27250 * r27256;
return r27257;
}
double f(double r, double a, double b) {
double r27258 = r;
double r27259 = b;
double r27260 = sin(r27259);
double r27261 = r27258 * r27260;
double r27262 = a;
double r27263 = cos(r27262);
double r27264 = cos(r27259);
double r27265 = sin(r27262);
double r27266 = r27260 * r27265;
double r27267 = fma(r27263, r27264, r27266);
double r27268 = r27263 * r27264;
double r27269 = r27268 - r27266;
double r27270 = r27267 * r27269;
double r27271 = r27270 / r27267;
double r27272 = r27261 / r27271;
return r27272;
}



Bits error versus r



Bits error versus a



Bits error versus b
Initial program 14.8
rmApplied cos-sum0.3
Simplified0.3
rmApplied associate-*r/0.3
rmApplied flip--0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019195 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
(* r (/ (sin b) (cos (+ a b)))))