Bill Allombert on Sat, 05 Jul 2025 22:53:24 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: flags in a bitmap


On Sat, Jul 05, 2025 at 09:19:19PM +0200, Ruud H.G. van Tol wrote:
> 
> On 2025-07-05 20:37, Bill Allombert wrote:
> > [...]
> > I have made a updated version (which no more allow to clear the highest bit).
> 
> ? ??bitclear
> 'bitclear' not found !

You need to do 'make install-doc' (You can set a custom prefix with Configure).

> ? ?bitset
> bitset(~x,n): set bit n of x in place, assuming x >= 2^n.
> 
> ? ?bitclear
> bitclear(~x,n): clear bit n of x in place, assuming x >= 2^(n+1).
> 
> ? ?bitflip
> bitflip(~x,n): flip bit n of x in place, assuming x >= 2^{n+1}.

Good catch! I have made a new push.

I added examples to the documentation.

I still need one example for bitflip, if you have some ideas!

Cheers,
Bill.