R
Rick
Hi,
I'm working on an implementation of a garbage collector (inside a write
barrier) where I can't use while or for loops.. I need to calculate the
log_2 of a number without using loops. Currently I was using a while
loop for counting the number of bits in a number, while bit shifting it
to the right. Is there some way to calculate log_2 without using a loop
of any kind? Thanks
Rick
I'm working on an implementation of a garbage collector (inside a write
barrier) where I can't use while or for loops.. I need to calculate the
log_2 of a number without using loops. Currently I was using a while
loop for counting the number of bits in a number, while bit shifting it
to the right. Is there some way to calculate log_2 without using a loop
of any kind? Thanks
Rick