aspcore.utilities.is_power_of_2

aspcore.utilities.is_power_of_2(x)

Returns True if x is a power of 2, False otherwise

Parameters:

x (int) – The number to check

Returns:

is_power_of_2 – True if x is a power of 2, False otherwise

Return type:

bool