Average Error: 13.5 → 0.2
Time: 58.2s
Precision: 64
Internal Precision: 320
\[\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 -27714782.050513014:\\ \;\;\;\;\left(\frac{1}{\sin B \cdot {F}^{2}} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{if}\;F \le 77357060.20485163:\\ \;\;\;\;\frac{F}{{\left(F \cdot F + \left(2 \cdot x + 2\right)\right)}^{\left(\frac{1}{2}\right)} \cdot \sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{\sin B} - \frac{x}{\tan B}\right) - \frac{\frac{1}{\sin B}}{F \cdot F}\\ \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 < -27714782.050513014

    1. Initial program 24.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 simplify24.7

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

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

    if -27714782.050513014 < F < 77357060.20485163

    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. Applied simplify0.3

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

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

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

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

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

    if 77357060.20485163 < F

    1. Initial program 24.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 simplify24.4

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

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

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

Runtime

Time bar (total: 58.2s)Debug logProfile

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