Why is float getting rounded off in this Objective C / Cocoa code
Posted
by Amarsh
on Stack Overflow
See other posts from Stack Overflow
or by Amarsh
Published on 2010-03-20T13:30:22Z
Indexed on
2010/03/20
13:31 UTC
Read the original article
Hit count: 389
objective-c
|float
I am doing a simple :
float x = 151.185436;
printf("x=%f",x);
and the result is
x=151.185440
Whats wrong here? I want to retain and print my original value of 151.185436
Thanks Amarsh
© Stack Overflow or respective owner