node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / popcount64

Function: popcount64()

popcount64(value): number

Defined in: bits.ts:69

Count set bits in the low 64 bits of a number or bigint.

Parameters

value

Input value. For number, it must be a non-negative safe integer.

number bigint

Returns

number

Number of set bits (0-64).

Throws

If value is negative or an unsafe integer.