calculator icon indicating copy to clipboard operation
calculator copied to clipboard

Simplify calculations of the nearest power of 2

Open AZero13 opened this issue 2 years ago • 0 comments

Use compiler intrinsics to find the nearest power of 2 as quickly as possible.

In addition, handle the 0 case, so that the program does not become stuck in an infinite loop if iNum is 0.

AZero13 avatar Sep 27 '23 20:09 AZero13