\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\frac{1}{\sin B} - \frac{1}{\frac{\frac{\sin B}{x}}{\cos B}}double f(double B, double x) {
double r20753694 = x;
double r20753695 = 1.0;
double r20753696 = B;
double r20753697 = tan(r20753696);
double r20753698 = r20753695 / r20753697;
double r20753699 = r20753694 * r20753698;
double r20753700 = -r20753699;
double r20753701 = sin(r20753696);
double r20753702 = r20753695 / r20753701;
double r20753703 = r20753700 + r20753702;
return r20753703;
}
double f(double B, double x) {
double r20753704 = 1.0;
double r20753705 = B;
double r20753706 = sin(r20753705);
double r20753707 = r20753704 / r20753706;
double r20753708 = x;
double r20753709 = r20753706 / r20753708;
double r20753710 = cos(r20753705);
double r20753711 = r20753709 / r20753710;
double r20753712 = r20753704 / r20753711;
double r20753713 = r20753707 - r20753712;
return r20753713;
}



Bits error versus B



Bits error versus x
Results
Initial program 0.2
Simplified0.2
Taylor expanded around inf 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac0.2
Applied add-cube-cbrt0.9
Applied add-sqr-sqrt0.9
Applied times-frac0.9
Applied prod-diff0.9
Simplified0.2
Simplified0.2
rmApplied clear-num0.2
Final simplification0.2
herbie shell --seed 2019125 +o rules:numerics
(FPCore (B x)
:name "VandenBroeck and Keller, Equation (24)"
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))