Input Error: 59.9b
Output Error: 0.3b
Time: 13.2s
Precision: 64b
Ground Truth: 128b
\[\frac{1}{x} - \cot x\]
\[\frac{1}{45} \cdot {x}^3 + \left({x}^{5} \cdot \frac{2}{945} + x \cdot \frac{1}{3}\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 59.9b

    \[\frac{1}{x} - \cot x\]
  2. Applied taylor 0.3b

    \[\leadsto \frac{1}{45} \cdot {x}^{3} + \left(\frac{2}{945} \cdot {x}^{5} + \frac{1}{3} \cdot x\right)\]
  3. Taylor expanded around 0 0.3b

    \[\leadsto \color{blue}{\frac{1}{45} \cdot {x}^{3} + \left(\frac{2}{945} \cdot {x}^{5} + \frac{1}{3} \cdot x\right)}\]
  4. Applied simplify 0.3b

    \[\leadsto \color{blue}{\frac{1}{45} \cdot {x}^3 + \left({x}^{5} \cdot \frac{2}{945} + x \cdot \frac{1}{3}\right)}\]
  5. Removed slow pow expressions

Runtime

Total time: 13.2s Debug log

herbie --seed '#(3268272407 3826362060 1988834148 3984693594 624930266 2577797936)'
(FPCore (x)
  :name "NMSE example 3.9"
  
  :target
  (if (< (fabs x) 0.026) (* (/ x 3) (+ 1 (/ (sqr x) 15))) (- (/ 1 x) (cotan x)))(- (/ 1 x) (cotan x)))