Average Error: 0.0 → 0.0
Time: 20.7s
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 2019004 +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: 19.8s)Debug log

sample41.0ms

Algorithm
intervals

simplify1.1s

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune12.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize18.0ms

Local error

Found 4 expressions with local error:

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

series91.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

36.0ms
(- 1 (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
34.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
11.0ms
(- 2 (/ 2 (+ 1 t)))
9.0ms
(- 2 (/ 2 (+ 1 t)))

simplify5.2s

Counts
16 → 69
Calls

16 calls. Slowest were:

790.0ms
(cbrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
704.0ms
(sqrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
679.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune637.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize32.0ms

Local error

Found 4 expressions with local error:

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

rewrite3.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:

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

simplify4.5s

Counts
12 → 64
Calls

12 calls. Slowest were:

748.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
702.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
634.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune1.0s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize24.0ms

Local error

Found 4 expressions with local error:

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

series59.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

17.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))
14.0ms
(- 2 (/ 2 (+ 1 t)))
13.0ms
(- 2 (/ 2 (+ 1 t)))

simplify4.5s

Counts
12 → 64
Calls

12 calls. Slowest were:

708.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
668.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))
597.0ms
(- (+ (* 2 t) (* 2 (pow t 3))) (* 2 (pow t 2)))

prune759.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes31.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.7s

Algorithm
intervals