Math.log is more precise in Ruby 1.9 - leads to values like 1023.999999 instead of 1024