title: Double precision when number converted from string
body: <p>I’m getting numbers from a database. Some are stored as <code>double</code> in the database and some are stored as <code>string</code>.</p>
  
  <p>What I want to do is count the <code>decimal number</code> of caracters so : 345.34938 would give me a result of <code>5</code>.</p>
  
  <p>As I said, some of my <code>double</code> come from the database as <code>double</code> and some as <code>string</code>. I’m wondering if there could be any kind of problem when <code>casting</code> the <code>string</code> numbers to <code>double</code>, hence giving me wrong result when trying to <code>count</code> the decimals.</p>
  
  <p>I think I should be ok but I’m afraid that in some situations I’ll end up receiving wrong double numbers when they’re casted from the <code>string</code> (thinking about having 1.9999999 instead of 2.0, things like that)...</p>
  
  <p>Is there any kind of risk that casting my number from <code>string</code> to <code>double</code> would give me strange result when stored as <code>double</code> in my application ? Am I being to frisky around that ?</p>