4 ms·
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 nu
by crb002 10y ago
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.