Average Error: 0.0 → 0.0
Time: 21.4s
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 2019007 +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: 21.1s)Debug log

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

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

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

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

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

series64.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

27.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
16.0ms
(- 2 (/ 2 (+ 1 t)))
13.0ms
(- 2 (/ 2 (+ 1 t)))
8.0ms
(/ 2 (+ 1 t))

simplify6.1s

Counts
21 → 73
Calls

21 calls. Slowest were:

738.0ms
(sqrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
709.0ms
(cbrt (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
686.0ms
(fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)

prune735.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize23.0ms

Local error

Found 4 expressions with local error:

4.6b
(- 2 (/ 2 (+ 1 t)))
4.6b
(- 2 (/ 2 (+ 1 t)))
1.0b
(log (exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))
0.5b
(exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
4 → 58
Calls

4 calls. Slowest were:

5.0ms
(log (exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))
3.0ms
(exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
1.0ms
(- 2 (/ 2 (+ 1 t)))

series134.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

62.0ms
(exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))
40.0ms
(log (exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))
16.0ms
(- 2 (/ 2 (+ 1 t)))
15.0ms
(- 2 (/ 2 (+ 1 t)))

simplify10.0s

Counts
24 → 70
Calls

24 calls. Slowest were:

845.0ms
(/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))
790.0ms
(log (sqrt (exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))))
762.0ms
(log (* (cbrt (exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2)))) (cbrt (exp (/ 1 (fma (- 2 (/ 2 (+ 1 t))) (- 2 (/ 2 (+ 1 t))) 2))))))

prune638.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes17.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample2.2s

Algorithm
intervals