Average Error: 0.0 → 0.0
Time: 20.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)}\]
\[\frac{1 - {\left(\frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*}\right)}^{3}}{1 + \left(\frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*} \cdot \frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*} + \frac{1}{(\left(2 - \frac{2}{1 + t}\right) \cdot \left(2 - \frac{2}{1 + t}\right) + 2)_*}\right)}\]

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 flip3--0.0

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

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

Reproduce

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

sample62.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))))))))

prune8.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize17.0ms

Local error

Found 4 expressions with local error:

3.3b
(- 2 (/ 2 (+ 1 t)))
3.3b
(- 2 (/ 2 (+ 1 t)))
0.0b
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
0.0b
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 57
Calls

4 calls. Slowest were:

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

series101.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

44.0ms
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
38.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
10.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify5.1s

Counts
16 → 69
Calls

16 calls. Slowest were:

763.0ms
(cbrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
750.0ms
(sqrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
680.0ms
(fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)

prune568.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize33.0ms

Local error

Found 4 expressions with local error:

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

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
4 → 52
Calls

4 calls. Slowest were:

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

series37.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify4.5s

Counts
12 → 64
Calls

12 calls. Slowest were:

738.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
649.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
633.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune1.1s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize11.0ms

Local error

Found 4 expressions with local error:

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

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
4 → 52
Calls

4 calls. Slowest were:

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

series56.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

16.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))
12.0ms
(- 2 (/ 2 (+ 1 t)))

simplify5.2s

Counts
12 → 64
Calls

12 calls. Slowest were:

733.0ms
(- (+ (* 2 (/ 1 (pow t 2))) 2) (* 2 (/ 1 t)))
688.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
656.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune823.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.0b

regimes38.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