\frac{r \cdot \sin b}{\cos \left(a + b\right)}\frac{r \cdot \sin b}{\mathsf{fma}\left(-\sin a, \sin b, \cos b \cdot \cos a\right)}double f(double r, double a, double b) {
double r24042 = r;
double r24043 = b;
double r24044 = sin(r24043);
double r24045 = r24042 * r24044;
double r24046 = a;
double r24047 = r24046 + r24043;
double r24048 = cos(r24047);
double r24049 = r24045 / r24048;
return r24049;
}
double f(double r, double a, double b) {
double r24050 = r;
double r24051 = b;
double r24052 = sin(r24051);
double r24053 = r24050 * r24052;
double r24054 = a;
double r24055 = sin(r24054);
double r24056 = -r24055;
double r24057 = cos(r24051);
double r24058 = cos(r24054);
double r24059 = r24057 * r24058;
double r24060 = fma(r24056, r24052, r24059);
double r24061 = r24053 / r24060;
return r24061;
}



Bits error versus r



Bits error versus a



Bits error versus b
Initial program 14.9
rmApplied cos-sum0.3
Taylor expanded around inf 0.3
Simplified0.3
Taylor expanded around inf 0.3
Simplified0.3
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019303 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), A"
:precision binary64
(/ (* r (sin b)) (cos (+ a b))))