Average Error: 58.5 → 0.0
Time: 18.0s
Precision: 64
Internal Precision: 128
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[(\left(\log_* (1 + \left(-x\right))\right) \cdot \frac{-1}{2} + \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(\log \left(1 - x\right)\right) \cdot \frac{-1}{2} + \left(\frac{\log_* (1 + x)}{2}\right))_*\]
  3. Using strategy rm
  4. Applied sub-neg50.4

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

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

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

Runtime

Time bar (total: 18.0s)Debug log

start408.0ms

Algorithm
intervals

setup83.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 50.4b

localize25.0ms

Local error

Found 1 expressions with local error:

6.3b
(log (- 1 x))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
1 → 18
Calls

1 calls. Slowest were:

2.0ms
(log (- 1 x))

series27.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

27.0ms
(log (- 1 x))

simplify976.0ms

Counts
11 → 21
Calls

11 calls. Slowest were:

340.0ms
(- (+ (log (/ -1 x)) (+ (* 1/2 (/ 1 (pow x 2))) (/ 1 x))))
302.0ms
(- (log -1) (+ (log (/ 1 x)) (+ (* 1/2 (/ 1 (pow x 2))) (/ 1 x))))
299.0ms
(- (+ x (+ (* 1/3 (pow x 3)) (* 1/2 (pow x 2)))))

prune267.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize19.0ms

Local error

Found 0 expressions with local error:

rewrite0.0ms

Algorithm
rewrite-expression-head
Counts
0 → 0
Calls

0 calls. Slowest were:

series0.0ms

Counts
0 → 0
Calls

0 calls. Slowest were:

simplify0.0ms

Counts
0 → 0
Calls

0 calls. Slowest were:

prune8.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

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