12 Replies Latest reply on Dec 23, 2009 11:25 AM by 807580

    Need help with calculating floating point numbers in JAVA


      I am using JDK1.5.0_07. I performed a particular calculation in JAVA - 4671.11 * 100
      The value returned is 467110.99999999994 instead of 467111.

      The reason being 4671.11 cannot be represented exactly in floating point.

      Can anyone please tell me which are the other numbers in JAVA which cannot be represented as floating point numbers.