title: Number precision in typescript
body: <p>I'm doing a website with angular, and I'm trying to sum two numbers and show them in a <code>&lt; div &gt;</code>, but I don't know how to manage the precision. </p>
  
  <p>For example, with the following code:</p>
  
  <p><strong>htlm:</strong></p>
  
  <pre><code>&lt;div&gt;{{sum}}&lt;/div&gt;
  </code></pre>
  
  <p><strong>typescript:</strong></p>
  
  <pre><code>sum = 9.9 + 1.3
  </code></pre>
  
  <p>The website shows the value <code>11.200000000000001</code>, when I would like to show <code>11.2</code></p>
  
  <p>I have seen that the way to manage float operations is by using <code>toFixed(1)</code>, and then I get the expecte <code>11.2</code>. 
  However, if I use <code>toFixed(1)</code>, for the operation <code>10.0 + 1.0</code> I get <code>11.0</code> when I would like to obtain <code>11</code></p>
  
  <p>So what I would like to have is the number with one decimal when there are decimals, and without decimals when there aren't decimals</p>