Saturday, 31 August 2013

C++ I've just read that floats are inexact and do not store exact integer values. What does this mean?

C++ I've just read that floats are inexact and do not store exact integer
values. What does this mean?

I am thinking of this at a binary level.
would a float of value 1 and an integer of value 1 not compile down to
(omitting lots of zeros here)
0001
If they do both compile down to this then where does this inexactness come
in.
Resource I'm using is http://www.cprogramming.com/tutorial/lesson1.html
Thanks.

No comments:

Post a Comment