title: Handle money and currencies in javascript multiplying and dividing by 100
body: <p>I'm writing an app for myself. I need to handle money and currencies.</p>
  <p>I read <a href="https://frontstuff.io/how-to-handle-monetary-values-in-javascript" rel="nofollow noreferrer">this</a> and I want to try the second approach:</p>
  <blockquote>
  <p>You can multiply floats into integers before you calculate, then divide them back.</p>
  <p>(0.2 * 100 + 0.01 * 100) / 100 // returns 0.21 </p>
  <p>It’s a fine solution but requires extra calculations either on object construction or on each manipulation. This isn’t necessarily draining on performances, but still more process work than necessary.</p>
  </blockquote>
  <p>With my backend I store values in <code>int64</code>.</p>
  <h3>QUESTION</h3>
  <p>Let's take <code>1.1</code>.</p>
  <p><code>1.1 * 100 = 110.00000000000001</code>!!!</p>
  <p>How can I be safe for all operations?</p>
  <p>It's safe to always use <code>(1.1 * 100).toFixed()</code>?</p>