\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 r774695 = x;
double r774696 = 1.0;
double r774697 = B;
double r774698 = tan(r774697);
double r774699 = r774696 / r774698;
double r774700 = r774695 * r774699;
double r774701 = -r774700;
double r774702 = sin(r774697);
double r774703 = r774696 / r774702;
double r774704 = r774701 + r774703;
return r774704;
}
double f(double B, double x) {
double r774705 = 1.0;
double r774706 = B;
double r774707 = sin(r774706);
double r774708 = r774705 / r774707;
double r774709 = cos(r774706);
double r774710 = x;
double r774711 = r774709 * r774710;
double r774712 = r774705 - r774711;
double r774713 = r774708 * r774712;
return r774713;
}



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