Re: probable bug of "ispower" function in GP: FALSE, apologies!
Vincent Lefevre <[email protected]>
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2023-01-12 12:31:09 +0100, [email protected] wrote: > I misunderstood the definition of "ispower"! > > I wanted a function that identify directly if some integer is a power of 2 I suppose that you can use something like ispower(64,,&n) and check that n is 2. But I suppose that for large numbers, this may be inefficient because ispower() will not just check for powers of 2. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)