find position of most significant bit ?

Torbjorn Granlund tege@swox.com
26 Nov 2002 19:04:06 +0100


George Coulouris <coulouri@ncbi.nlm.nih.gov> writes:

  mpz_sizeinbase(op, 2) would do it, but I don't know if there is a more
  efficent way to accomplish this.

mpz_sizeinbase(op,2) should need just a few cycles.
Is that not efficient enough?  ;-)

-- 
Torbjörn