[PATCH] mini-gmp: avoid a mpz_sizeinbase call in mpz_get_str
David Sparks
sparks05 at proton.me
Fri Oct 16 03:51:13 CEST 2026
On Thursday, 15 October 2026 at 19:50, David Sparks <sparks05 at proton.me> wrote:
> Since log 2/log 5 = 0.215338, w could use a multiplier
> of 2^34, but then you'd have the problem that k*w overflows
> 64 bits for k > 4986302614 = 0x12934f096, so you've lost
> range.
Please disregard previous e-mail; I sent it too fast.
I forgot (at least) one place while increasing the scale
factor from 2^32 to 2^33, and it corrupted all my results.
Re-doing more carefully...
More information about the gmp-devel
mailing list