title: NSNumber lose decimal digits
body: <p>I need to save a float into a NSNumber (the variable called ordered.value).
  The problem is the decimal digits have been set to zero during the conversion.</p>
  
  <p>Also I've add a log of 3 version of variable so you can see that the original float is correct. And then the NSNumber has lost the decimal digits.</p>
  
  <p>this was my first attempt (the simpler version):</p>
  
  <pre><code>ordered.value = [NSNumber numberWithFloat:[o.valore floatValue]];
  NSLog(@"%f,%f",[o.valore floatValue],[ordered.value floatValue]);
  </code></pre>
  
  <p>But I still lose decimal digits.
  LOG:</p>
  
  <pre><code>2013-05-20 20:05:19.617 Piazzetta[9636:c07] 232.179993,232.000000
  2013-05-20 20:05:19.617 Piazzetta[9636:c07] 20159.490234,20159.000000
  2013-05-20 20:05:19.618 Piazzetta[9636:c07] 16.540001,16.000000
  </code></pre>
  
  <p>This is my second attempt (with NSNumberFormatter)</p>
  
  <pre><code>NSNumberFormatter * f = [[NSNumberFormatter alloc] init];
  [f setNumberStyle:NSNumberFormatterDecimalStyle];
  ordered.value = [f numberFromString:o.valore];
  NSLog(@"%f,%f",[o.valore floatValue],[ordered.value floatValue]);
  </code></pre>
  
  <p>LOG:</p>
  
  <pre><code>2013-05-20 20:16:22.781 Piazzetta[9951:c07] 232.179993,232.000000
  2013-05-20 20:16:22.782 Piazzetta[9951:c07] 20159.490234,20159.000000
  2013-05-20 20:16:22.782 Piazzetta[9951:c07] 16.540001,16.000000
  </code></pre>