Average Error: 13.4 → 13.3
Time: 55.7s
Precision: 64
Internal Precision: 384
\[\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)}\]
\[\begin{array}{l} \mathbf{if}\;\frac{F}{B} \cdot \sqrt{\frac{1}{2}} - (\left(\frac{F}{\sqrt{\frac{1}{2}}}\right) \cdot \left(\frac{1}{4} \cdot \frac{x}{B}\right) + \left(\frac{x}{B}\right))_* = -\infty:\\ \;\;\;\;(\left({\left((F \cdot F + \left((2 \cdot x + 2)_*\right))_*\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \left(\frac{F}{\sin B}\right) + \left(\frac{-x}{\sin B} \cdot \cos B\right))_*\\ \mathbf{else}:\\ \;\;\;\;(\left({\left((F \cdot F + \left((2 \cdot x + 2)_*\right))_*\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \left(F \cdot \frac{1}{\sin B}\right) + \left(\frac{-x}{\tan B}\right))_*\\ \end{array}\]

Error

Bits error versus F

Bits error versus B

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if (- (* (/ F B) (sqrt 1/2)) (fma (/ F (sqrt 1/2)) (* 1/4 (/ x B)) (/ x B)))

    1. Initial program 39.4

      \[\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. Applied simplify39.3

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

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

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

    if (- (* (/ F B) (sqrt 1/2)) (fma (/ F (sqrt 1/2)) (* 1/4 (/ x B)) (/ x B)))

    1. Initial program 11.6

      \[\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. Applied simplify11.6

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

      \[\leadsto (\left({\left((F \cdot F + \left((2 \cdot x + 2)_*\right))_*\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \color{blue}{\left(F \cdot \frac{1}{\sin B}\right)} + \left(\frac{-x}{\tan B}\right))_*\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 55.7s)Debug logProfile

herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' +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))))))