Average Error: 14.0 → 11.0
Time: 11.9s
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{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}}\]
\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))))));
}

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: 14.0 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: 14.0 bits

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

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

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

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

    \[\leadsto \frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \color{blue}{\frac{1}{\frac{\tan B}{x \cdot 1}}}\]
  10. Final simplificationError: 11.0 bits

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

Reproduce

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