only check for positive powers of 2
This commit is contained in:
parent
e07baf28c1
commit
bbe1e3ffdc
|
@ -10,10 +10,8 @@ int n, *ref_exp;
|
|||
int exp;
|
||||
|
||||
exp= 0;
|
||||
if (n<0)
|
||||
n= -n;
|
||||
|
||||
if (!n)
|
||||
if (n <= 0)
|
||||
return 0;
|
||||
|
||||
while (!(n % 2))
|
||||
|
|
Loading…
Reference in a new issue