Third attempt for SUM
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Sun Nov 13 08:56:30 PST 2016
On Sunday, 13 November 2016 at 16:04:51 UTC, safety0ff wrote:
> On Saturday, 12 November 2016 at 15:37:29 UTC, Ilya Yaroshenko
> wrote:
>> Hi all,
>>
>> Advanced summation algorithms [3] from Mir project [1] are
>> ready to be merged to Phobos.
>
> Hi,
> Do you have any thoughts at to when Kahan should be used over
> KBN?
>
> I was testing summation for a program (summing logarithms of
> primes as doubles,) and KBN seemed to be slightly outperforming
> Kahan.
Yes, KBN should be used instead Kahan when possible (for example
Quaternions can not be summed using default KBN implementation).
BTW, i have implemented sumOfLogs [1], it is more precise then
everything else.
[1] http://dlang.org/phobos/std_numeric.html#.sumOfLog2s
More information about the Digitalmars-d
mailing list