Average Error: 13.8 → 0.2
Time: 28.9s
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 -15919763.674101105:\\ \;\;\;\;\frac{\frac{1}{{F}^{2}} - 1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 11693.995374146416:\\ \;\;\;\;\frac{\left(\left({\left(\sqrt{\sqrt[3]{x \cdot 2 + \left(2 + F \cdot F\right)}} \cdot \left|\sqrt[3]{\left(x \cdot 2 + F \cdot F\right) + 2}\right|\right)}^{\frac{-1}{2}} \cdot {\left(\sqrt{\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}}\right)}^{\frac{-1}{2}}\right) \cdot {\left(\sqrt{\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}}\right)}^{\frac{-1}{2}}\right) \cdot F}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{1}{{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 < -15919763.674101105

    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.0

      \[\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. Taylor expanded around -inf 0.2

      \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} - 1}}{\sin B} - \frac{x}{\tan B}\]

    if -15919763.674101105 < F < 11693.995374146416

    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)}^{\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 add-sqr-sqrt0.3

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

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

      \[\leadsto \frac{\left({\left(\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}\right)}^{\frac{-1}{2}} \cdot {\color{blue}{\left(\sqrt{\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}} \cdot \sqrt{\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}}\right)}}^{\frac{-1}{2}}\right) \cdot F}{\sin B} - \frac{x}{\tan B}\]
    10. Applied unpow-prod-down0.3

      \[\leadsto \frac{\left({\left(\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}\right)}^{\frac{-1}{2}} \cdot \color{blue}{\left({\left(\sqrt{\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}}\right)}^{\frac{-1}{2}} \cdot {\left(\sqrt{\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}}\right)}^{\frac{-1}{2}}\right)}\right) \cdot F}{\sin B} - \frac{x}{\tan B}\]
    11. Applied associate-*r*0.3

      \[\leadsto \frac{\color{blue}{\left(\left({\left(\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}\right)}^{\frac{-1}{2}} \cdot {\left(\sqrt{\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}}\right)}^{\frac{-1}{2}}\right) \cdot {\left(\sqrt{\sqrt{\left(2 + F \cdot F\right) + 2 \cdot x}}\right)}^{\frac{-1}{2}}\right)} \cdot F}{\sin B} - \frac{x}{\tan B}\]
    12. Using strategy rm
    13. Applied add-cube-cbrt0.3

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

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

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

    if 11693.995374146416 < F

    1. Initial program 25.2

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

      \[\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/20.1

      \[\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. Taylor expanded around inf 0.1

      \[\leadsto \frac{\color{blue}{1 - \frac{1}{{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 -15919763.674101105:\\ \;\;\;\;\frac{\frac{1}{{F}^{2}} - 1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \le 11693.995374146416:\\ \;\;\;\;\frac{\left(\left({\left(\sqrt{\sqrt[3]{x \cdot 2 + \left(2 + F \cdot F\right)}} \cdot \left|\sqrt[3]{\left(x \cdot 2 + F \cdot F\right) + 2}\right|\right)}^{\frac{-1}{2}} \cdot {\left(\sqrt{\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}}\right)}^{\frac{-1}{2}}\right) \cdot {\left(\sqrt{\sqrt{x \cdot 2 + \left(2 + F \cdot F\right)}}\right)}^{\frac{-1}{2}}\right) \cdot F}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{1}{{F}^{2}}}{\sin B} - \frac{x}{\tan B}\\ \end{array}\]

Runtime

Time bar (total: 28.9s)Debug logProfile

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