Average Error: 13.8 → 10.5
Time: 12.3s
Precision: binary64
\[\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}\]
\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)))))));
}

Error

Bits error versus F

Bits error versus B

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program Error: 13.8 bits

    \[\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)}\]
  2. SimplifiedError: 10.5 bits

    \[\leadsto \color{blue}{F \cdot \frac{{\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{\left(\frac{-1}{2}\right)}}{\sin B} - x \cdot \frac{1}{\tan B}}\]
  3. Using strategy rm
  4. Applied div-invError: 10.5 bits

    \[\leadsto F \cdot \color{blue}{\left({\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{\left(\frac{-1}{2}\right)} \cdot \frac{1}{\sin B}\right)} - x \cdot \frac{1}{\tan B}\]
  5. Applied associate-*r*Error: 10.5 bits

    \[\leadsto \color{blue}{\left(F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{\left(\frac{-1}{2}\right)}\right) \cdot \frac{1}{\sin B}} - x \cdot \frac{1}{\tan B}\]
  6. SimplifiedError: 10.5 bits

    \[\leadsto \color{blue}{\left(F \cdot {\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\left(\frac{-1}{2}\right)}\right)} \cdot \frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\]
  7. Using strategy rm
  8. Applied distribute-frac-negError: 10.5 bits

    \[\leadsto \left(F \cdot {\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\color{blue}{\left(-\frac{1}{2}\right)}}\right) \cdot \frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\]
  9. Applied pow-negError: 10.5 bits

    \[\leadsto \left(F \cdot \color{blue}{\frac{1}{{\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\left(\frac{1}{2}\right)}}}\right) \cdot \frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\]
  10. Applied un-div-invError: 10.5 bits

    \[\leadsto \color{blue}{\frac{F}{{\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\left(\frac{1}{2}\right)}}} \cdot \frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\]
  11. Applied frac-timesError: 10.5 bits

    \[\leadsto \color{blue}{\frac{F \cdot 1}{{\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B}} - x \cdot \frac{1}{\tan B}\]
  12. SimplifiedError: 10.5 bits

    \[\leadsto \frac{\color{blue}{F}}{{\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B} - x \cdot \frac{1}{\tan B}\]
  13. Using strategy rm
  14. Applied associate-/r*Error: 10.5 bits

    \[\leadsto \color{blue}{\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}\]
  15. Final simplificationError: 10.5 bits

    \[\leadsto \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}\]

Reproduce

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