Average Error: 13.5 → 10.8
Time: 2.4m
Precision: 64
Internal Precision: 128
\[\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)}\]
\[\left(\frac{1}{\sin B} \cdot {\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}}\right) \cdot F - x \cdot \frac{1}{\tan B}\]

Error

Bits error versus F

Bits error versus B

Bits error versus x

Derivation

  1. Initial program 13.5

    \[\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. Simplified13.1

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

    \[\leadsto \color{blue}{\frac{{\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}}}{\sin B} \cdot F} - \frac{x}{\tan B}\]
  5. Using strategy rm
  6. Applied div-inv10.8

    \[\leadsto \color{blue}{\left({\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}} \cdot \frac{1}{\sin B}\right)} \cdot F - \frac{x}{\tan B}\]
  7. Using strategy rm
  8. Applied div-inv10.8

    \[\leadsto \left({\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}} \cdot \frac{1}{\sin B}\right) \cdot F - \color{blue}{x \cdot \frac{1}{\tan B}}\]
  9. Final simplification10.8

    \[\leadsto \left(\frac{1}{\sin B} \cdot {\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}}\right) \cdot F - x \cdot \frac{1}{\tan B}\]

Reproduce

herbie shell --seed 2019091 +o rules:numerics
(FPCore (F B x)
  :name "VandenBroeck and Keller, Equation (23)"
  (+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))