mpz_perfect_power_p

Torbjorn Granlund tg at swox.com
Tue Dec 23 17:16:47 CET 2008


Vincent Lefevre <vincent at vinc17.org> writes:

  On 2008-12-23 04:53:54 +0100, Torbjorn Granlund wrote:
  > +#define POW2P(a) ((a & (a-1)) == 0)
  
  Even though this is not needed here, putting parentheses would make
  the code more maintainable:
  
    #define POW2P(a) (((a) & ((a)-1)) == 0)
  
Fixed, thanks!

-- 
Torbjörn


More information about the gmp-bugs mailing list