pow2floor

sofia_redux.scan.utilities.numba_functions.pow2floor(x)[source]

Return 2 to the power of floor(log_2(x)).

Finds where 2^n <= x < 2^(n+1) and returns 2^n.

Parameters:
xint or float
Returns:
int