Average Error: 58.5 → 0.0
Time: 26.0s
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.6

    \[\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.5

    \[\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 log1p-expm1-u50.5

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

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

Runtime

Time bar (total: 26.0s)Debug logProfile

herbie shell --seed '#(1070833653 108281690 3330367898 3632331308 3494323072 43156186)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))