Average Error: 58.6 → 0.2
Time: 20.5s
Precision: 64
Internal Precision: 1344
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[\left(\frac{2}{5} \cdot {x}^{5} + x \cdot (\frac{2}{3} \cdot \left(x \cdot x\right) + 2)_*\right) \cdot \frac{1}{2}\]

Error

Bits error versus x

Derivation

  1. Initial program 58.6

    \[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
  2. Initial simplification58.6

    \[\leadsto \frac{1}{2} \cdot \log \left(\frac{x + 1}{1 - x}\right)\]
  3. Taylor expanded around 0 0.2

    \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(2 \cdot x + \left(\frac{2}{3} \cdot {x}^{3} + \frac{2}{5} \cdot {x}^{5}\right)\right)}\]
  4. Simplified0.2

    \[\leadsto \frac{1}{2} \cdot \color{blue}{(\left((\frac{2}{3} \cdot \left(x \cdot x\right) + 2)_*\right) \cdot x + \left({x}^{5} \cdot \frac{2}{5}\right))_*}\]
  5. Using strategy rm
  6. Applied fma-udef0.2

    \[\leadsto \frac{1}{2} \cdot \color{blue}{\left((\frac{2}{3} \cdot \left(x \cdot x\right) + 2)_* \cdot x + {x}^{5} \cdot \frac{2}{5}\right)}\]
  7. Final simplification0.2

    \[\leadsto \left(\frac{2}{5} \cdot {x}^{5} + x \cdot (\frac{2}{3} \cdot \left(x \cdot x\right) + 2)_*\right) \cdot \frac{1}{2}\]

Runtime

Time bar (total: 20.5s)Debug logProfile

herbie shell --seed 2018234 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))