title: MongoDB floating point value precision?
body: <p>As I know, JavaScript uses IEEE 754 Floating point to treat real numbers.
  The problem arises when using it, it's quite common issue:</p>
  
  <blockquote>
    <p>0.1 + 0.2 = 0.30000000000000004</p>
  </blockquote>
  
  <p>Most of time, using the module like 'big.js', but the problem is when using MongoDB.</p>
  
  <p>Look at this document:</p>
  
  <blockquote>
    <p>{ "_id" : ObjectId("58ff8f721bbfbcd140e472b3"), "value" : 0.1 }</p>
  </blockquote>
  
  <p>When I run $inc like this:</p>
  
  <blockquote>
    <p>db.dec.update({ _id: ObjectId('58ff8f721bbfbcd140e472b3') }, { $inc: { value: 0.2 }});</p>
  </blockquote>
  
  <p>The result is not good at all:</p>
  
  <blockquote>
    <p>{ "_id" : ObjectId("58ff8f721bbfbcd140e472b3"), "value" : 0.30000000000000004 }</p>
  </blockquote>
  
  <p>I know why it's happening, but is there a way to avoid this problem?</p>