
Fast exact summation using small and large superaccumulators - nanis
https://arxiv.org/abs/1505.05571
======
dzdt
Related blog post : [https://radfordneal.wordpress.com/2015/05/21/exact-
computati...](https://radfordneal.wordpress.com/2015/05/21/exact-computation-
of-sums-and-means/)

As someone who has worked with building, testing, and numerical software, this
seems like a great thing. Generally floating point computations are
effectively non-deterministic: you (or the compiler) change something that
doesn't seem like it matters and all of a sudden your result changes. Having
more methods available that give you the deterministically best right thing at
little additional expense is great!

~~~
Chris2048
Was the software you worked on a general numerics platform, or something more
specialised? I'm trying to learn more about the topic myself, from a finance
perspective.

~~~
al2o3cr
This technique seems like overkill for most finance applications - you can fit
nearly any sensible currency amount into a 64-bit fixed-point number (or a
128-bit if you're doing whole-economy calculations).

------
simonbyrne
Funny coincidence. I happened to point to some papers and code for
superaccumulators in a StackOverflow answer yesterday:
[http://stackoverflow.com/a/41741276/392585](http://stackoverflow.com/a/41741276/392585)

~~~
nanis
Thank you. That's where I saw this.

------
crb002
Sort/bucket the abosute value within some epsilon then merge pairwise in a
binary tree.

Or split FloatMax into 32-2048 bins. Start all at zero. Add incoming numbers
to the corresponding bin. If a bin goes out of range zero it and add the sum
where it needs to go. When you are done keep adding the lowest magnitude bin
to the next highest.

