Returns the largest power of two strictly less than n
.
If no such number exists, returns 1
instead.
Equations
- lastPowerOfTwo n = lastPowerOfTwo_iter ((n + 1) / 2) n
Returns the largest power of two strictly less than n
.
If no such number exists, returns 1
instead.