Average Error: 16.0 → 15.5
Time: 15.3s
Precision: 64
Internal Precision: 128
\[\frac{x}{x \cdot x + 1}\]
\[x + \left(\sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*} \cdot \sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*}\right) \cdot \sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*}\]

Error

Bits error versus x

Target

Original16.0
Target16.1
Herbie15.5
\[\frac{1}{x + \frac{1}{x}}\]

Derivation

  1. Initial program 16.0

    \[\frac{x}{x \cdot x + 1}\]
  2. Initial simplification16.0

    \[\leadsto \frac{x}{(x \cdot x + 1)_*}\]
  3. Taylor expanded around 0 15.5

    \[\leadsto \color{blue}{\left(x + {x}^{5}\right) - {x}^{3}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity15.5

    \[\leadsto \left(x + {x}^{5}\right) - \color{blue}{1 \cdot {x}^{3}}\]
  6. Applied *-un-lft-identity15.5

    \[\leadsto \color{blue}{1 \cdot \left(x + {x}^{5}\right)} - 1 \cdot {x}^{3}\]
  7. Applied prod-diff15.5

    \[\leadsto \color{blue}{(1 \cdot \left(x + {x}^{5}\right) + \left(-{x}^{3} \cdot 1\right))_* + (\left(-{x}^{3}\right) \cdot 1 + \left({x}^{3} \cdot 1\right))_*}\]
  8. Simplified15.5

    \[\leadsto \color{blue}{\left((\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_* + x\right)} + (\left(-{x}^{3}\right) \cdot 1 + \left({x}^{3} \cdot 1\right))_*\]
  9. Simplified15.5

    \[\leadsto \left((\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_* + x\right) + \color{blue}{0}\]
  10. Using strategy rm
  11. Applied add-cube-cbrt15.5

    \[\leadsto \left(\color{blue}{\left(\sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*} \cdot \sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*}\right) \cdot \sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*}} + x\right) + 0\]
  12. Final simplification15.5

    \[\leadsto x + \left(\sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*} \cdot \sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*}\right) \cdot \sqrt[3]{(\left(-x\right) \cdot \left(x \cdot x\right) + \left({x}^{5}\right))_*}\]

Runtime

Time bar (total: 15.3s)Debug logProfile

herbie shell --seed 2018255 +o rules:numerics
(FPCore (x)
  :name "x / (x^2 + 1)"

  :herbie-target
  (/ 1 (+ x (/ 1 x)))

  (/ x (+ (* x x) 1)))