Closed mitchellwrosen closed 8 years ago
It's not a bug actually. Weights should add up to 2^32
-- | Generate a condensed lookup table from integer weights. Weights
-- should sum to @2^32@. If they don't, the algorithm will alter the
-- weights so that they do. This approach should work reasonably well
-- for rounding errors.
Algorithm tries to bring sum up to 2^32 but it's slow since it was created to account for rounding errors when converting from double weights to exact integral weights
I think this line is misleading, then.
If they don't, the algorithm will alter the weights so that they do.
It's surprising that scaling the given weights would be slow.
Yes I agree. Current algorithm will take ≈2^32 step and I think will produce grossly wrong answer. It could only fix small deviations from 2^32
I reopened issue and changed title
This hangs for some reason, but only on lists of 2+ elements. Singleton lists return immediately.