Re: bit_ffs
Bill Allombert <[email protected]>
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <ZCXQShfVlYFA3SeK@seventeen> |
On Thu, Mar 30, 2023 at 07:02:34PM +0200, Ruud H.G. van Tol wrote: > > Might be interesting to add: > > https://en.wikipedia.org/wiki/Find_first_set > https://www.man7.org/linux/man-pages/man3/ffs.3.html > https://www.go4expert.com/articles/builtin-gcc-functions-builtinclz-t29238/ > > Or are those too low-level? > > bit_ffs, bit_ctz For the bitxxx functions family in GP, you can use valuation(x,2) (resp. logint(x,2)) Cheers, Bill.