Average Error: 58.5 → 0.7
Time: 32.1s
Precision: 64
Internal Precision: 1344
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[\frac{\log_* (1 + 2 \cdot (x \cdot x + x)_*)}{2}\]

Error

Bits error versus x

Derivation

  1. Initial program 58.5

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

    \[\leadsto \frac{1}{2} \cdot \log \color{blue}{\left(2 \cdot {x}^{2} + \left(1 + 2 \cdot x\right)\right)}\]
  3. Applied simplify0.7

    \[\leadsto \color{blue}{\frac{\log_* (1 + 2 \cdot (x \cdot x + x)_*)}{2}}\]

Runtime

Time bar (total: 32.1s)Debug logProfile

herbie shell --seed '#(1071821486 549052472 3784827256 1559736200 3548510075 881134285)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))