Average Error: 13.4 → 0.8
Time: 1.0m
Precision: 64
Internal Precision: 576
\[\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}\;F \le -1.6024889111708113 \cdot 10^{+154}:\\ \;\;\;\;\left(\frac{1}{{F}^{2} \cdot \sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{if}\;F \le 67153259084786.05:\\ \;\;\;\;{\left(\left(2 + x \cdot 2\right) + F \cdot F\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{F}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{1}{{F}^{2} \cdot \sin B}\right) - \frac{x}{\tan B}\\ \end{array}\]

Error

Bits error versus F

Bits error versus B

Bits error versus x

Derivation

  1. Split input into 3 regimes
  2. if F < -1.6024889111708113e+154

    1. Initial program 41.7

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

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

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

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

      \[\leadsto \frac{\color{blue}{F}}{{\left(\left(2 + x \cdot 2\right) + F \cdot F\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B} - \frac{x}{\tan B}\]
    7. Taylor expanded around -inf 0.2

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

    if -1.6024889111708113e+154 < F < 67153259084786.05

    1. Initial program 1.3

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

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

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

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

    if 67153259084786.05 < F

    1. Initial program 25.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 simplify25.3

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

      \[\leadsto \color{blue}{\frac{1}{{\left(\left(2 + x \cdot 2\right) + F \cdot F\right)}^{\left(\frac{1}{2}\right)}}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B}\]
    5. Applied frac-times19.7

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

      \[\leadsto \frac{\color{blue}{F}}{{\left(\left(2 + x \cdot 2\right) + F \cdot F\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B} - \frac{x}{\tan B}\]
    7. Taylor expanded around inf 0.1

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

Runtime

Time bar (total: 1.0m)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' 
(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))))))