Unfortunately the log function isn't inexpensive
True, but you can halve the expense for large numbers of evaluations by storing log(2), which is just a constant.
🦛
In reply to Re^2: Most Significant Set Bit
by hippo
in thread Most Significant Set Bit
by coldr3ality
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |