Average Error: 0.0 → 0.0
Time: 13.6s
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(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. Final simplification0.0

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

Reproduce

herbie shell --seed 2019008 +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: 13.3s)Debug log

sample72.0ms

Algorithm
intervals

simplify1.0s

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune17.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.4b
(- 2 (/ 2 (+ 1 t)))
3.4b
(- 2 (/ 2 (+ 1 t)))
0.0b
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
0.0b
(/ 2 (+ 1 t))

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
4 → 56
Calls

4 calls. Slowest were:

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

series85.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

44.0ms
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
16.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(/ 2 (+ 1 t))

simplify4.1s

Counts
17 → 68
Calls

17 calls. Slowest were:

645.0ms
(- (+ (* 2 (/ 1 t)) (* 2 (/ 1 (pow t 3)))) (* 2 (/ 1 (pow t 2))))
638.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
628.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune598.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize57.0ms

Local error

Found 4 expressions with local error:

3.4b
(- 2 (/ 2 (+ 1 t)))
3.4b
(- 2 (/ 2 (+ 1 t)))
3.4b
(- 2 (/ 2 (+ 1 t)))
3.4b
(- 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)))

series66.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

19.0ms
(- 2 (/ 2 (+ 1 t)))
16.0ms
(- 2 (/ 2 (+ 1 t)))
16.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))

simplify4.7s

Counts
12 → 64
Calls

12 calls. Slowest were:

700.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
657.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))
607.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune963.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes30.0ms

Accuracy

0% (0.0b remaining)

Error of 0.0b against oracle of 0.0b and baseline of 0.0b

bsearch3.0ms

end0.0ms

sample1.6s

Algorithm
intervals