Average Error: 12.9 → 0.2
Time: 39.4s
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 -15749.460455466537:\\ \;\;\;\;\left(\frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 4.450233192341468 \cdot 10^{+22}:\\ \;\;\;\;F \cdot \frac{1}{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x}{\tan B}\\ \end{array}\]

Error

Bits error versus F

Bits error versus B

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if F < -15749.460455466537

    1. Initial program 22.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. Initial simplification22.4

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

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

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

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

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

    1. Initial program 0.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. Initial simplification0.3

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

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

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

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

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

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

    if 4.450233192341468e+22 < F

    1. Initial program 25.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. Initial simplification25.5

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \le -15749.460455466537:\\ \;\;\;\;\left(\frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 4.450233192341468 \cdot 10^{+22}:\\ \;\;\;\;F \cdot \frac{1}{{\left(2 \cdot x + \left(2 + F \cdot F\right)\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{1}{\sin B \cdot {F}^{2}}\right) - \frac{x}{\tan B}\\ \end{array}\]

Runtime

Time bar (total: 39.4s)Debug logProfile

herbie shell --seed 2018234 
(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))))))