r \cdot \frac{\sin b}{\cos \left(a + b\right)}r \cdot \frac{\sin b}{\cos a \cdot \cos b - \sqrt[3]{{\left(\sin b \cdot \sin a\right)}^{3}}}(FPCore (r a b) :precision binary64 (* r (/ (sin b) (cos (+ a b)))))
(FPCore (r a b) :precision binary64 (* r (/ (sin b) (- (* (cos a) (cos b)) (cbrt (pow (* (sin b) (sin a)) 3.0))))))
double code(double r, double a, double b) {
return ((double) (r * (((double) sin(b)) / ((double) cos(((double) (a + b)))))));
}
double code(double r, double a, double b) {
return ((double) (r * (((double) sin(b)) / ((double) (((double) (((double) cos(a)) * ((double) cos(b)))) - ((double) cbrt(((double) pow(((double) (((double) sin(b)) * ((double) sin(a)))), 3.0)))))))));
}



Bits error versus r



Bits error versus a



Bits error versus b
Results
Initial program Error: 15.1 bits
rmApplied cos-sumError: 0.3 bits
rmApplied add-cbrt-cubeError: 0.4 bits
Applied add-cbrt-cubeError: 0.4 bits
Applied cbrt-unprodError: 0.4 bits
SimplifiedError: 0.4 bits
Final simplificationError: 0.4 bits
herbie shell --seed 2020204
(FPCore (r a b)
:name "rsin B"
:precision binary64
(* r (/ (sin b) (cos (+ a b)))))