\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\left(1 - \cos B \cdot x\right) \cdot \frac{1}{\sin B}double f(double B, double x) {
double r889546 = x;
double r889547 = 1.0;
double r889548 = B;
double r889549 = tan(r889548);
double r889550 = r889547 / r889549;
double r889551 = r889546 * r889550;
double r889552 = -r889551;
double r889553 = sin(r889548);
double r889554 = r889547 / r889553;
double r889555 = r889552 + r889554;
return r889555;
}
double f(double B, double x) {
double r889556 = 1.0;
double r889557 = B;
double r889558 = cos(r889557);
double r889559 = x;
double r889560 = r889558 * r889559;
double r889561 = r889556 - r889560;
double r889562 = 1.0;
double r889563 = sin(r889557);
double r889564 = r889562 / r889563;
double r889565 = r889561 * r889564;
return r889565;
}



Bits error versus B



Bits error versus x
Results
Initial program 0.2
Simplified0.2
Taylor expanded around inf 0.2
Simplified0.2
rmApplied *-un-lft-identity0.2
Applied times-frac0.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.0 (tan B)))) (/ 1.0 (sin B))))