\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\mathsf{fma}\left(-\frac{x \cdot 1}{\sin B}, \cos B, \frac{1}{\sin B}\right)double f(double B, double x) {
double r22595 = x;
double r22596 = 1.0;
double r22597 = B;
double r22598 = tan(r22597);
double r22599 = r22596 / r22598;
double r22600 = r22595 * r22599;
double r22601 = -r22600;
double r22602 = sin(r22597);
double r22603 = r22596 / r22602;
double r22604 = r22601 + r22603;
return r22604;
}
double f(double B, double x) {
double r22605 = x;
double r22606 = 1.0;
double r22607 = r22605 * r22606;
double r22608 = B;
double r22609 = sin(r22608);
double r22610 = r22607 / r22609;
double r22611 = -r22610;
double r22612 = cos(r22608);
double r22613 = r22606 / r22609;
double r22614 = fma(r22611, r22612, r22613);
return r22614;
}



Bits error versus B



Bits error versus x
Initial program 0.2
rmApplied associate-*r/0.1
rmApplied tan-quot0.2
Applied associate-/r/0.2
Applied distribute-lft-neg-in0.2
Applied fma-def0.2
Final simplification0.2
herbie shell --seed 2019303 +o rules:numerics
(FPCore (B x)
:name "VandenBroeck and Keller, Equation (24)"
:precision binary64
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))