Average Error: 58.4 → 0.2
Time: 24.1s
Precision: 64
Internal Precision: 128
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[(\frac{2}{5} \cdot \left({x}^{5}\right) + \left(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.4

    \[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
  2. Simplified58.4

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

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

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

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

Reproduce

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