about mpz_siezinbase function

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Mon Mar 18 15:53:12 CET 2013


Ciao,

Il Lun, 18 Marzo 2013 5:20 am, Hwang soon chan ha scritto:
> i was solving problem => http://projecteuler.net/problem=57
>
> to find answer, i was compare mpz_sizeinbase
>
> but this return-value is not correct. : (

Look at the documentation:
http://gmplib.org/manual/Miscellaneous-Integer-Functions.html

About mpz_sizeinbase it says: "The result will be either exact or 1 too
big. If base is a power of 2, the result is always exact."

Base 10 is not a power of 2, and result will not always be exact.

Regards,
m

-- 
http://bodrato.it/software/



More information about the gmp-bugs mailing list