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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.6

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

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

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

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

Runtime

Time bar (total: 19.3s)Debug logProfile

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