\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{\frac{F}{{\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\left(\frac{1}{2}\right)}}}{\sin B} - x \cdot \frac{1}{\tan B}(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)) (* x (/ 1.0 (tan B)))))
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) (((F / ((double) pow(((double) (((double) (F * F)) + ((double) (2.0 + ((double) (2.0 * x)))))), (1.0 / 2.0)))) / ((double) sin(B))) - ((double) (x * (1.0 / ((double) tan(B)))))));
}



Bits error versus F



Bits error versus B



Bits error versus x
Results
Initial program Error: 13.8 bits
SimplifiedError: 10.5 bits
rmApplied div-invError: 10.5 bits
Applied associate-*r*Error: 10.5 bits
SimplifiedError: 10.5 bits
rmApplied distribute-frac-negError: 10.5 bits
Applied pow-negError: 10.5 bits
Applied un-div-invError: 10.5 bits
Applied frac-timesError: 10.5 bits
SimplifiedError: 10.5 bits
rmApplied associate-/r*Error: 10.5 bits
Final simplificationError: 10.5 bits
herbie shell --seed 2020204
(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))))))