title: Lack of precision of the toFixed method in javascript
body: <p>I have do some test about <code>Number.prototype.toFixed</code> method in chrome(v60.0.3112.101) console and found sth puzzled me.</p>
  
  <p>Why <code>1.15.toFixed(1)</code> return "1.1" but not the "1.2"?<br>
  Why <code>1.05.toFixed(1)</code> return "1.1" but not the "1.0"?<br>
  and so on...
  <a href="https://i.stack.imgur.com/KtZFM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KtZFM.png" alt="test on the chrome console"></a></p>
  
  <hr>
  
  <p>I do research in the <a href="https://www.ecma-international.org/ecma-262/8.0/index.html#sec-number.prototype.tofixed" rel="nofollow noreferrer">ECMAScript specification</a>.</p>
  
  <blockquote>
    <p><strong>NOTE 1</strong>
    toFixed returns a String containing this Number value represented in <strong>decimal fixed-point notation</strong> with fractionDigits digits after the decimal point. If fractionDigits is undefined, 0 is assumed.</p>
  </blockquote>
  
  <p>I know what's the <a href="https://chortle.ccsu.edu/AssemblyTutorial/Chapter-29/ass29_7.html#fixed_point_notation" rel="nofollow noreferrer">fixed point notation</a>.But I can't explain the puzzles above. Could someone give a clear explaination?</p>
  
  <hr>
  
  <p>BTW, I think the details arithmetic under the <a href="https://www.ecma-international.org/ecma-262/8.0/index.html#sec-number.prototype.tofixed" rel="nofollow noreferrer">specification</a> should be improved.
  Saying 1.105 for instance, the relative arithmetic is the following:</p>
  
  <blockquote>
    <p>Let n be an integer for which the exact mathematical value of n ÷ 10^f - x is as close to zero as possible. If there are two such n, pick the larger n.</p>
  </blockquote>
  
  <p>According to <code>pick the larger n</code>, 111 should be taken into consideration but not the 110, which is contradicted to reality.</p>