\frac{r \cdot \sin b}{\cos \left(a + b\right)}\frac{r \cdot \sin b}{\mathsf{fma}\left(\cos a, \cos b, -\mathsf{expm1}\left(\mathsf{log1p}\left(\sin a \cdot \sin b\right)\right)\right)}double f(double r, double a, double b) {
double r1133014 = r;
double r1133015 = b;
double r1133016 = sin(r1133015);
double r1133017 = r1133014 * r1133016;
double r1133018 = a;
double r1133019 = r1133018 + r1133015;
double r1133020 = cos(r1133019);
double r1133021 = r1133017 / r1133020;
return r1133021;
}
double f(double r, double a, double b) {
double r1133022 = r;
double r1133023 = b;
double r1133024 = sin(r1133023);
double r1133025 = r1133022 * r1133024;
double r1133026 = a;
double r1133027 = cos(r1133026);
double r1133028 = cos(r1133023);
double r1133029 = sin(r1133026);
double r1133030 = r1133029 * r1133024;
double r1133031 = log1p(r1133030);
double r1133032 = expm1(r1133031);
double r1133033 = -r1133032;
double r1133034 = fma(r1133027, r1133028, r1133033);
double r1133035 = r1133025 / r1133034;
return r1133035;
}



Bits error versus r



Bits error versus a



Bits error versus b
Initial program 15.3
rmApplied cos-sum0.3
rmApplied prod-diff0.3
rmApplied expm1-log1p-u0.3
Taylor expanded around 0 0.3
Final simplification0.3
herbie shell --seed 2019179 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), A"
(/ (* r (sin b)) (cos (+ a b))))