Average Error: 58.5 → 0.0
Time: 20.9s
Precision: 64
Internal Precision: 1408
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[\frac{1}{2} \cdot \left(\log_* (1 + x) + \left(-\log_* (1 + \left(-x\right))\right)\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. Using strategy rm
  3. Applied div-inv58.5

    \[\leadsto \frac{1}{2} \cdot \log \color{blue}{\left(\left(1 + x\right) \cdot \frac{1}{1 - x}\right)}\]
  4. Applied log-prod58.5

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

    \[\leadsto \frac{1}{2} \cdot \left(\color{blue}{\log_* (1 + x)} + \log \left(\frac{1}{1 - x}\right)\right)\]
  6. Applied simplify50.4

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

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

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

Runtime

Time bar (total: 20.9s)Debug logProfile

herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))