-
Junior Member
Re: Program output
Ouput is :
f is NOT 1.0n
This is because floating point numbers doesn't have accuracy in certain cases (unlike 'double'). The interpretation inside the machine will be different than what we see.Thus, even though we see the value as 1.0f, due to different storage interpretation, it will fail to compare with actual 1.0f.
The full article and details can be found in wikipedia related to floating point arithmatics.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules