\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \frac{1}{\frac{\tan B}{x \cdot 1}}(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
(FPCore (F B x) :precision binary64 (- (/ (* F (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))) (sin B)) (/ 1.0 (/ (tan B) (* x 1.0)))))
double code(double F, double B, double x) {
return ((double) (((double) -(((double) (x * (1.0 / ((double) tan(B))))))) + ((double) ((F / ((double) sin(B))) * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) -((1.0 / 2.0)))))))));
}
double code(double F, double B, double x) {
return ((double) ((((double) (F * ((double) pow(((double) (((double) (((double) (F * F)) + 2.0)) + ((double) (2.0 * x)))), ((double) -((1.0 / 2.0))))))) / ((double) sin(B))) - (1.0 / (((double) tan(B)) / ((double) (x * 1.0))))));
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
Initial program Error: 14.0 bits
SimplifiedError: 14.0 bits
rmApplied associate-*l/Error: 11.0 bits
SimplifiedError: 11.0 bits
rmApplied associate-*r/Error: 10.9 bits
rmApplied clear-numError: 11.0 bits
Final simplificationError: 11.0 bits
herbie shell --seed 2020205
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))