Average Error: 13.5 → 0.4
Time: 46.1s
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}\;F \le -3.0547809850731815 \cdot 10^{+69}:\\ \;\;\;\;\left(\frac{1}{{F}^{2} \cdot \sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{if}\;F \le 1.3909680608234172 \cdot 10^{+20}:\\ \;\;\;\;{\left(\left(x \cdot 2 + 2\right) + F \cdot F\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{F}{\sin B} - \frac{\cos B \cdot x}{\sin 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 < -3.0547809850731815e+69

    1. Initial program 30.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)}\]
    2. Applied simplify30.0

      \[\leadsto \color{blue}{{\left(\left(x \cdot 2 + 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-neg30.0

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

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

      \[\leadsto \frac{\color{blue}{F}}{{\left(\left(x \cdot 2 + 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}{{F}^{2} \cdot \sin B} - \frac{1}{\sin B}\right)} - \frac{x}{\tan B}\]

    if -3.0547809850731815e+69 < F < 1.3909680608234172e+20

    1. Initial program 0.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 simplify0.5

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

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

    if 1.3909680608234172e+20 < F

    1. Initial program 25.9

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

      \[\leadsto \color{blue}{{\left(\left(x \cdot 2 + 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.8

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

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

      \[\leadsto \frac{\color{blue}{F}}{{\left(\left(x \cdot 2 + 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}{\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: 46.1s)Debug logProfile

herbie shell --seed '#(1070386091 2509006183 1430610344 1025408621 36622005 1425925650)' 
(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))))))