Re: flags in a bitmap

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <aGfcTzcK9eDsSNep@seventeen>
On Fri, Jul 04, 2025 at 12:38:59PM +0200, Ruud H.G. van Tol wrote:
> > ? install(bitset,vWL)
> > ? x=2^(2^20);
> > ? forprime(p=2,2^20,bitset(~x,p))
> >   ***   last result computed in 8 ms.
> > ? my(S=0);for(i=0,2^20-1,S+=bittest(x,i));S
> > %16 = 82025
> >   ***   last result computed in 159 ms.
> 
> That indeed looks good, and I can test it.

Great, I have made a GIT branch bill-bitset

commit 8632eaf7528554234aaa90d9a503476452cbd736 (HEAD -> bill-bitset, origin/bill-bitset, master)
Author: Bill Allombert <[email protected]>
Date:   Thu Jul 3 23:57:00 2025 +0200

    New GP functions bitset, bitclear

Cheers,
Bill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.