Average Error: 13.8 → 10.6
Time: 1.2m
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)}\]
\[\frac{1}{\sin B} \cdot \left({\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}} \cdot F\right) - \frac{x \cdot \cos B}{\sin B}\]

Error

Bits error versus F

Bits error versus B

Bits error versus x

Derivation

  1. Initial program 13.8

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

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

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

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

    \[\leadsto \left({\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}} \cdot F\right) \cdot \frac{1}{\sin B} - \frac{x}{\color{blue}{\frac{\sin B}{\cos B}}}\]
  8. Applied associate-/r/10.6

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

    \[\leadsto \left({\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}} \cdot F\right) \cdot \frac{1}{\sin B} - \color{blue}{\left(x \cdot \frac{1}{\sin B}\right)} \cdot \cos B\]
  11. Applied associate-*l*10.7

    \[\leadsto \left({\left((2 \cdot x + \left((F \cdot F + 2)_*\right))_*\right)}^{\frac{-1}{2}} \cdot F\right) \cdot \frac{1}{\sin B} - \color{blue}{x \cdot \left(\frac{1}{\sin B} \cdot \cos B\right)}\]
  12. Taylor expanded around inf 10.6

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

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

Reproduce

herbie shell --seed 2019050 +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))))))