\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\sin B}, \frac{1}{\sin B}\right) + \frac{x \cdot \cos B}{\sin B} \cdot \left(\left(-1\right) + 1\right)double f(double B, double x) {
double r25097 = x;
double r25098 = 1.0;
double r25099 = B;
double r25100 = tan(r25099);
double r25101 = r25098 / r25100;
double r25102 = r25097 * r25101;
double r25103 = -r25102;
double r25104 = sin(r25099);
double r25105 = r25098 / r25104;
double r25106 = r25103 + r25105;
return r25106;
}
double f(double B, double x) {
double r25107 = 1.0;
double r25108 = -r25107;
double r25109 = x;
double r25110 = B;
double r25111 = cos(r25110);
double r25112 = r25109 * r25111;
double r25113 = sin(r25110);
double r25114 = r25112 / r25113;
double r25115 = r25107 / r25113;
double r25116 = fma(r25108, r25114, r25115);
double r25117 = r25108 + r25107;
double r25118 = r25114 * r25117;
double r25119 = r25116 + r25118;
return r25119;
}



Bits error versus B



Bits error versus x
Initial program 0.2
Simplified0.2
rmApplied associate-*r/0.2
rmApplied tan-quot0.2
Applied associate-/r/0.2
Applied add-sqr-sqrt32.9
Applied prod-diff32.9
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019322 +o rules:numerics
(FPCore (B x)
:name "VandenBroeck and Keller, Equation (24)"
:precision binary64
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))