r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{r}{\mathsf{fma}\left(\cos a, \cos b, -\sin b \cdot \sin a\right)} \cdot \sin bdouble f(double r, double a, double b) {
double r19125 = r;
double r19126 = b;
double r19127 = sin(r19126);
double r19128 = a;
double r19129 = r19128 + r19126;
double r19130 = cos(r19129);
double r19131 = r19127 / r19130;
double r19132 = r19125 * r19131;
return r19132;
}
double f(double r, double a, double b) {
double r19133 = r;
double r19134 = a;
double r19135 = cos(r19134);
double r19136 = b;
double r19137 = cos(r19136);
double r19138 = sin(r19136);
double r19139 = sin(r19134);
double r19140 = r19138 * r19139;
double r19141 = -r19140;
double r19142 = fma(r19135, r19137, r19141);
double r19143 = r19133 / r19142;
double r19144 = r19143 * r19138;
return r19144;
}



Bits error versus r



Bits error versus a



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