This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi Tina both int and float uses 32 bits but... int uses 32 bits to store the int value whereas float uses 32 bits to store significant number plus fraction part also. so number of bits are less than 32 to store a significant value .so float will store approx. close value for large int not exact. that is why you are getting 3 and false.
same reason for second question
[ April 20, 2007: Message edited by: raj malhotra ] [ April 20, 2007: Message edited by: raj malhotra ]