Average Error: 0.0 → 0.0
Time: 16.5s
Precision: 64
Internal Precision: 128
\[1 - \frac{1}{2 + \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right) \cdot \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right)}\]
\[1 - \frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) + 2)_*}\]

Error

Bits error versus t

Derivation

  1. Initial program 0.0

    \[1 - \frac{1}{2 + \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right) \cdot \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right)}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{1 - \frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*}}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.0

    \[\leadsto 1 - \frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right)} + 2)_*}\]
  5. Final simplification0.0

    \[\leadsto 1 - \frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(\left(\sqrt[3]{2 - \frac{2}{1 + t}} \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) \cdot \sqrt[3]{2 - \frac{2}{1 + t}}\right) + 2)_*}\]

Reproduce

herbie shell --seed 2019002 +o rules:numerics
(FPCore (t)
  :name "Kahan p13 Example 3"
  (- 1 (/ 1 (+ 2 (* (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))) (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))))))))

Details

Time bar (total: 16.2s)Debug log

sample79.0ms

Algorithm
intervals

simplify1.2s

Counts
1 → 1
Calls

1 calls. Slowest were:

1.2s
(- 1 (/ 1 (+ 2 (* (- 2 (/ (/ 2 t) (+ 1 (/ 1 t)))) (- 2 (/ (/ 2 t) (+ 1 (/ 1 t))))))))

prune13.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize36.0ms

Local error

Found 4 expressions with local error:

3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))
0.0b
(/ 2 (+ 1 t))
0.0b
(/ 2 (+ 1 t))

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
4 → 60
Calls

4 calls. Slowest were:

1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(/ 2 (+ 1 t))
1.0ms
(/ 2 (+ 1 t))

series54.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

15.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))
12.0ms
(/ 2 (+ 1 t))
12.0ms
(/ 2 (+ 1 t))

simplify6.2s

Counts
22 → 72
Calls

22 calls. Slowest were:

803.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
768.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
730.0ms
(- (+ (* 2 (/ 1 t)) (* 2 (/ 1 (pow t 3)))) (* 2 (/ 1 (pow t 2))))

prune1.0s

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize39.0ms

Local error

Found 4 expressions with local error:

3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))
3.2b
(- 2 (/ 2 (+ 1 t)))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 52
Calls

4 calls. Slowest were:

1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series57.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

15.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))

simplify5.3s

Counts
12 → 64
Calls

12 calls. Slowest were:

862.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
793.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
753.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune688.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample1.6s

Algorithm
intervals