Skip to content

Commit

Permalink
Fix incorrect results for large numbers of points
Browse files Browse the repository at this point in the history
- replace all 32-bit integers with 64-bit integers
- previously the results would silently be incorrect if `num_points * k > 2^32-1`
  - caused by integer overflow (see storpipfugl#38)
  - for e.g. k=20 this occurred for ~200 million points (~a few GB of RAM)
- now the results are correct for any (practical) number of points
  - overflow would now only occur for k=20 with ~10^17 points (> trillions of GB of RAM)
  - resolves storpipfugl#38
  • Loading branch information
lkeegan committed Jan 16, 2025
1 parent dc38a63 commit c84a725
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 171 deletions.
Loading

0 comments on commit c84a725

Please sign in to comment.