Average Error: 13.0 → 0.3
Time: 52.0s
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 -5.568151123126909 \cdot 10^{+49}:\\ \;\;\;\;\left(\frac{1}{{F}^{2} \cdot \sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{if}\;F \le 2.173153612277468 \cdot 10^{+17}:\\ \;\;\;\;\left({\left(\sqrt{\left(x \cdot 2 + 2\right) + F \cdot F}\right)}^{\left(-\frac{1}{2}\right)} \cdot {\left(\sqrt{\left(x \cdot 2 + 2\right) + F \cdot F}\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{F}{\sin B} - \frac{x}{\tan 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 < -5.568151123126909e+49

    1. Initial program 28.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 simplify28.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-neg28.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-times21.9

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

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

    if -5.568151123126909e+49 < F < 2.173153612277468e+17

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

      \[\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 add-sqr-sqrt0.5

      \[\leadsto {\color{blue}{\left(\sqrt{\left(x \cdot 2 + 2\right) + F \cdot F} \cdot \sqrt{\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 unpow-prod-down0.5

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

    if 2.173153612277468e+17 < F

    1. Initial program 23.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 simplify23.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-neg23.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-times19.2

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

      \[\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}{\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: 52.0s)Debug logProfile

herbie shell --seed '#(1070991898 1055468627 4280279443 640792587 928206309 3646738750)' 
(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))))))