\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 r12852 = x;
double r12853 = 1.0;
double r12854 = B;
double r12855 = tan(r12854);
double r12856 = r12853 / r12855;
double r12857 = r12852 * r12856;
double r12858 = -r12857;
double r12859 = sin(r12854);
double r12860 = r12853 / r12859;
double r12861 = r12858 + r12860;
return r12861;
}
double f(double B, double x) {
double r12862 = x;
double r12863 = 1.0;
double r12864 = r12862 * r12863;
double r12865 = B;
double r12866 = sin(r12865);
double r12867 = r12864 / r12866;
double r12868 = -r12867;
double r12869 = cos(r12865);
double r12870 = r12863 / r12866;
double r12871 = fma(r12868, r12869, r12870);
return r12871;
}



Bits error versus B



Bits error versus x
Initial program 0.2
rmApplied associate-*r/0.2
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 2019346 +o rules:numerics
(FPCore (B x)
:name "VandenBroeck and Keller, Equation (24)"
:precision binary64
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))