\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 r17716096 = x;
double r17716097 = 1.0;
double r17716098 = B;
double r17716099 = tan(r17716098);
double r17716100 = r17716097 / r17716099;
double r17716101 = r17716096 * r17716100;
double r17716102 = -r17716101;
double r17716103 = sin(r17716098);
double r17716104 = r17716097 / r17716103;
double r17716105 = r17716102 + r17716104;
return r17716105;
}
double f(double B, double x) {
double r17716106 = 1.0;
double r17716107 = B;
double r17716108 = sin(r17716107);
double r17716109 = r17716106 / r17716108;
double r17716110 = x;
double r17716111 = r17716108 / r17716110;
double r17716112 = cos(r17716107);
double r17716113 = r17716111 / r17716112;
double r17716114 = r17716106 / r17716113;
double r17716115 = r17716109 - r17716114;
return r17716115;
}



Bits error versus B



Bits error versus x
Results
Initial program 0.2
Simplified0.2
Taylor expanded around -inf 0.2
rmApplied add-cube-cbrt0.6
Applied times-frac0.6
Applied add-sqr-sqrt31.8
Applied add-cube-cbrt31.8
Applied times-frac31.8
Applied prod-diff31.8
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))))