question on fixing the mpz_sizeinbase() command to work correctly

Torbjörn Granlund tg at gmplib.org
Sun Mar 17 01:28:27 CET 2024


"website.reader" <website.reader at protonmail.com> writes:

  I was using two types of number libraries, one was the GP-Pari number
  theory calculator and the other was gmp v6.3.0 of course

  I was sorting numbers based upon the count of digits that each
  had. For rational numbers, I counted the digits in both the numerator
  and denominator and summed them.

  However things didn't work right and I had to fix my code which used the gmp v6.3 mpz_sizeinbase() command.

  Here's the suggested fix for this command in a C++ code unit

[snip]

  Can this simple fix be placed into gmp? I trust it is not asking too much.

We trust that it is not asking too much that users who think they have
found a GMP bug report them properly.  How to do that is explained in
the online GMP manual, which we trust people can read.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list