javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Better `isPowerOfTwo` algos and files

Open Rudxain opened this issue 2 years ago • 1 comments

Closes #889.

The bitwise approach isn't mathematically correct, because it only works for 32bit ints, therefore it should be exclusive to the math/bits directory.

I also added info about the supported input args for both the trial division approach and the bitwise approach

Rudxain avatar May 31 '22 02:05 Rudxain

Now the non-bitwise fn supports BigInts

Rudxain avatar Jun 11 '22 14:06 Rudxain