title: Proper Usage and Formatting of a Float in Objective-C (or C)
body: <p>I have an iPhone app. I am storing a float value, (distance), in my sqlite3 db. (The field in the db is formatted to float) I am able to store float values correctly in the db no problem. However, I can't seem to figure out how to pull the value back out of the db the format and present it correctly. Here is my code for pulling the value out of my db and using it:</p>
  
  <pre><code>NSString *itemDistance = [NSString stringWithFormat:@"%f",[item distance]];
  float questionDistance = [itemDistance floatValue];
  </code></pre>
  
  <p>[item distance] is a float value. I can't get this to work. I get a REALLY long value instead. What am I doing wrong? Any help would be greatly appreciated.</p>
  
  <p>Thank you in advance for your help,</p>
  
  <p>L.</p>