Average Error: 58.5 → 0.0
Time: 8.8s
Precision: 64
Internal Precision: 1344
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[(\left(-\frac{1}{2}\right) \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.5

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

    \[\leadsto (\left(-\frac{1}{2}\right) \cdot \left(\log \left(1 - x\right)\right) + \left(\frac{\log_* (1 + x)}{2}\right))_*\]
  3. Using strategy rm
  4. Applied sub-neg50.4

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

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

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

Runtime

Time bar (total: 8.8s)Debug logProfile

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