stock

xs_is_2power

Syntax

stock xs_is_2power(x)

Description

Checks if the number is a power of 2.

Parameters

x Number to check.

Return

1 if it is a power of 2, 0 otherwise.