SpecFunc_BitCount

SpecFunc_BitCount(n)

Compute the number of bits set to 1 in an integer.

Parameters:
n : positive int
Returns:
result : positive int

Examples

>>> import openturns as ot
>>> int(ot.SpecFunc.BitCount(42))
3