\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 r48373 = x;
double r48374 = 1.0;
double r48375 = B;
double r48376 = tan(r48375);
double r48377 = r48374 / r48376;
double r48378 = r48373 * r48377;
double r48379 = -r48378;
double r48380 = sin(r48375);
double r48381 = r48374 / r48380;
double r48382 = r48379 + r48381;
return r48382;
}
double f(double B, double x) {
double r48383 = x;
double r48384 = 1.0;
double r48385 = r48383 * r48384;
double r48386 = B;
double r48387 = sin(r48386);
double r48388 = r48385 / r48387;
double r48389 = -r48388;
double r48390 = cos(r48386);
double r48391 = r48384 / r48387;
double r48392 = fma(r48389, r48390, r48391);
return r48392;
}



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))))