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

Error

Bits error versus x

Derivation

  1. Initial program 58.7

    \[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
  2. Applied simplify50.6

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

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

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

Runtime

Time bar (total: 9.6s)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))