r \cdot \frac{\sin b}{\cos \left(a + b\right)}-\frac{r \cdot \sin b}{\mathsf{fma}\left(-\cos b, \cos a, \mathsf{log1p}\left(\mathsf{expm1}\left(\sin b \cdot \sin a\right)\right)\right)}double f(double r, double a, double b) {
double r926128 = r;
double r926129 = b;
double r926130 = sin(r926129);
double r926131 = a;
double r926132 = r926131 + r926129;
double r926133 = cos(r926132);
double r926134 = r926130 / r926133;
double r926135 = r926128 * r926134;
return r926135;
}
double f(double r, double a, double b) {
double r926136 = r;
double r926137 = b;
double r926138 = sin(r926137);
double r926139 = r926136 * r926138;
double r926140 = cos(r926137);
double r926141 = -r926140;
double r926142 = a;
double r926143 = cos(r926142);
double r926144 = sin(r926142);
double r926145 = r926138 * r926144;
double r926146 = expm1(r926145);
double r926147 = log1p(r926146);
double r926148 = fma(r926141, r926143, r926147);
double r926149 = r926139 / r926148;
double r926150 = -r926149;
return r926150;
}



Bits error versus r



Bits error versus a



Bits error versus b
Initial program 15.5
rmApplied cos-sum0.3
rmApplied associate-*r/0.3
rmApplied frac-2neg0.3
Simplified0.3
rmApplied log1p-expm1-u0.4
Final simplification0.4
herbie shell --seed 2019165 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
(* r (/ (sin b) (cos (+ a b)))))