Bill Allombert on Fri, 04 Jul 2025 15:51:15 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: flags in a bitmap |
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 <Bill.Allombert@math.u-bordeaux.fr> Date: Thu Jul 3 23:57:00 2025 +0200 New GP functions bitset, bitclear Cheers, Bill