D-Programming-Language/phobos — pull request #2513 by 9il (2014-09-14 10:37:48+00:00)
Title: (do not merger) Precise , KB2, KBN and other fsum algo

Draft:
```D
import std.numeric : fsum;
import std.math, std.algorithm, std.range;
auto ar = iota(1000).map!(a => 1.7.pow(a+1) - 1.7.pow(a)).chain([-(1.7.pow(1000))]);
assert(ar.fsum == -1.0);
assert(ar.retro.fsum == -1.0);
assert(ar.fsum!real == -1.0);
```

```D
import std.algorithm : map;
import std.numeric : fsum;
auto ar = [1, 1e100, 1, -1e100].map!(a => a*10000);
double r = 20000;
assert(r != ar.fsum!(Summation.Naive));
assert(r != ar.fsum!(Summation.Reverse));
assert(r != ar.fsum!(Summation.Pairwise));
assert(r != ar.fsum!(Summation.Kahan));
assert(r == ar.fsum!(Summation.KBN));
assert(r == ar.fsum!(Summation.KB2));
assert(r == ar.fsum!(Summation.Precise));
```