Average Error: 13.7 → 0.2
Time: 1.1m
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 -8.79840120370125 \cdot 10^{+38}:\\ \;\;\;\;\left(\frac{1}{{F}^{2} \cdot \sin B} - \frac{1}{\sin B}\right) - \frac{x}{\tan B}\\ \mathbf{if}\;F \le 3.260214795753425 \cdot 10^{+28}:\\ \;\;\;\;\frac{F}{{\left(\left(2 + x \cdot 2\right) + F \cdot F\right)}^{\left(\frac{1}{2}\right)} \cdot \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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if F < -8.79840120370125e+38

    1. Initial program 27.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 simplify27.6

      \[\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-neg27.6

      \[\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-times22.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 simplify22.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.1

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

    if -8.79840120370125e+38 < F < 3.260214795753425e+28

    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(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-neg0.4

      \[\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-times0.3

      \[\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 simplify0.3

      \[\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}\]

    if 3.260214795753425e+28 < F

    1. Initial program 26.8

      \[\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 simplify26.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-neg26.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-times21.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 simplify21.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}{\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.1m)Debug logProfile

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