\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\frac{1}{\sin B} \cdot \left(1 - \cos B \cdot x\right)double f(double B, double x) {
double r1718730 = x;
double r1718731 = 1.0;
double r1718732 = B;
double r1718733 = tan(r1718732);
double r1718734 = r1718731 / r1718733;
double r1718735 = r1718730 * r1718734;
double r1718736 = -r1718735;
double r1718737 = sin(r1718732);
double r1718738 = r1718731 / r1718737;
double r1718739 = r1718736 + r1718738;
return r1718739;
}
double f(double B, double x) {
double r1718740 = 1.0;
double r1718741 = B;
double r1718742 = sin(r1718741);
double r1718743 = r1718740 / r1718742;
double r1718744 = cos(r1718741);
double r1718745 = x;
double r1718746 = r1718744 * r1718745;
double r1718747 = r1718740 - r1718746;
double r1718748 = r1718743 * r1718747;
return r1718748;
}



Bits error versus B



Bits error versus x
Results
Initial program 0.2
Simplified0.2
Taylor expanded around inf 0.2
rmApplied div-inv0.3
Applied *-un-lft-identity0.3
Applied *-un-lft-identity0.3
Applied times-frac0.3
Applied distribute-rgt-out--0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019168
(FPCore (B x)
:name "VandenBroeck and Keller, Equation (24)"
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))