title: log base 2 precision error
body: <p>I want to get mantissa of floating point number in JavaScript.</p>
  
  <p>So I get exponent part of floating point number first.<br>
  By mathematics, exponent is <code>floor(log2(x))</code>.  </p>
  
  <p>However, There is no <code>log2</code> function in JavaScript.<br>
  So I make it from the natural logarithm. But the precision is matter.</p>
  
  <p>Since <code>log2(pow(2, 3)) == 2.99999...</code>, <code>floor(log2(pow(2, 3)) == 2</code>.</p>
  
  <p>How can I solve this problem? Thanks.</p>
  
  <p>EDIT: I don't want to use <code>Math.log2</code> of ECMAScript6.</p>