diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-09-19 19:44:35 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-09-19 19:44:35 -0500 |
| commit | 3cf61177898fad4e6be85b52083e9c1b508d6568 (patch) | |
| tree | 8ba1c616a16d15a6b05fec44481a4afca22b977b /print_digit_map.go | |
| parent | 165e55184e79553c74b9c9056fd46f1b37a2b5d9 (diff) | |
factors.Score: Avoid overflow by using math/big
When using really large numbers, factors.Score could overflow, which
would cause an incorrect result. Using arbitrary-precision arithmetic
fixes this. I only do so above 2^28, since below then factor sums are
guaranteed to not overflow, and normal arithmetic is faster.
Diffstat (limited to 'print_digit_map.go')
0 files changed, 0 insertions, 0 deletions
