Average Error: 13.3 → 0.2
Time: 26.0s
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 -1.0011785747112418 \cdot 10^{+132}:\\ \;\;\;\;\frac{1}{\left(-1 - \frac{\frac{x}{F}}{F}\right) \cdot \sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 104881760.31626406:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{\frac{-1}{2}}}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{x \cdot \sin B}{{F}^{2}} + \sin B} - \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 < -1.0011785747112418e+132

    1. Initial program 37.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 simplification37.4

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

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

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

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

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

    if -1.0011785747112418e+132 < F < 104881760.31626406

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

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

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

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

    if 104881760.31626406 < F

    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. Initial simplification24.6

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{x \cdot \sin B}{{F}^{2}} + \sin B}} - \frac{x}{\tan B}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.2

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

Runtime

Time bar (total: 26.0s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes10.50.20.010.598.3%
herbie shell --seed 2018340 
(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))))))