r \cdot \frac{\sin b}{\cos \left(a + b\right)}\frac{1}{\cos a \cdot \cos b - \sin a \cdot \sin b} \cdot \left(r \cdot \sin b\right)double f(double r, double a, double b) {
double r18298 = r;
double r18299 = b;
double r18300 = sin(r18299);
double r18301 = a;
double r18302 = r18301 + r18299;
double r18303 = cos(r18302);
double r18304 = r18300 / r18303;
double r18305 = r18298 * r18304;
return r18305;
}
double f(double r, double a, double b) {
double r18306 = 1.0;
double r18307 = a;
double r18308 = cos(r18307);
double r18309 = b;
double r18310 = cos(r18309);
double r18311 = r18308 * r18310;
double r18312 = sin(r18307);
double r18313 = sin(r18309);
double r18314 = r18312 * r18313;
double r18315 = r18311 - r18314;
double r18316 = r18306 / r18315;
double r18317 = r;
double r18318 = r18317 * r18313;
double r18319 = r18316 * r18318;
return r18319;
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program 15.0
rmApplied cos-sum0.3
rmApplied associate-*r/0.3
rmApplied associate-/l*0.4
rmApplied div-inv0.4
Applied *-un-lft-identity0.4
Applied times-frac0.5
Simplified0.4
Final simplification0.4
herbie shell --seed 2020047
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))