Number of Bits Needed to Represent a Zero-Offset Integer

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 14 00:08:06 PST 2015


On Saturday, 14 February 2015 at 08:01:27 UTC, Ola Fosheim
Grøstad wrote:
> I think the naming depends on use context, so it is reasonable 
> to
> land on different names in different domains. Maybe the standard
> notation should be ffs(x):

Oops, I meant fls(x)... I just woke up :-P. It is a bad name
anyway... first and last, left or right...?

"msb position" or "integer log2" in some form is better... Just
"floor log2" with overloading might be good enough.


More information about the Digitalmars-d-learn mailing list