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

Error

Bits error versus x

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(\frac{2}{3} \cdot {x}^{3} + \left(\frac{2}{5} \cdot {x}^{5} + 2 \cdot x\right)\right)}\]
  3. Applied simplify0.2

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

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

Runtime

Time bar (total: 8.5m)Debug logProfile

herbie shell --seed '#(1071725047 233389029 2036512464 3988615230 2972226563 1111574017)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))