title: storing double values in SQLite: how to ensure precision?
body: <p>i have a problem with double values i need to store in an android homed sqlite database. since these double values represent gps values (lat &amp; lng), i really <code>NEED</code> an absolute precision down to the 9th number after the comma.</p>
  
  <p>now i have a table like this:</p>
  
  <pre><code>CREATE TABLE x REAL lng;
  </code></pre>
  
  <p>and insert sth (hardcoded) like:</p>
  
  <pre><code>INSERT INTO x lng = '1.0';
  </code></pre>
  
  <p>and when reading lng from this table into some (java) double variable, i get a value like "0.999956837" - this renders the values pretty useless to me.</p>
  
  <p>is there a way to enforce the precision i need other than storing the values as "text" fields (what would make expensive casts neccessary) or storing them as integers (meaning i need to multiply/divide at each write/read-op)?</p>