Is there any function in the GMP library which give me bitLength of any GMP variable?
mpz_t temp;
mpz_init(temp);
mpz_set_ui(temp,356678789);
Then how to find bitlength of temp?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perhaps there is a better, way, but after reading the docs I came up with this one: