Problem with calculating floats
Posted
by iFloh
on Stack Overflow
See other posts from Stack Overflow
or by iFloh
Published on 2010-05-21T04:48:36Z
Indexed on
2010/05/21
4:50 UTC
Read the original article
Hit count: 203
objective-c
|iphone
strange situation, when performing the following lines of Code:
const float a = 47.848711;
const float b = 47.862952;
float result = b - a;
I get a (NSLog %.10f) result = 0.0142440796.
I expected to get 0.0142410000.
What's going on?
© Stack Overflow or respective owner