Average Error: 58.6 → 0.2
Time: 34.2s
Precision: 64
Internal Precision: 1344
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[\frac{1}{2} \cdot \left(x \cdot 2 + \left({x}^{5} \cdot \frac{2}{5} + {x}^{3} \cdot \frac{2}{3}\right)\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. 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)}\]
  3. Final simplification0.2

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

Runtime

Time bar (total: 34.2s)Debug logProfile

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