<<< The eight primitive data types | Index | Equality of floating-point numbers >>> |
To express the value of a floating-point number, you can use scientific notation like 2.382E+5, which means 2.382 times 105 (a value of 238,200), or 3.25E-8, which means 3.25 times 10-8 (a value of .0000000325). Java will sometimes use this notation to display the value of a float or double data type.
Because of the way floating-point numbers are stored internally, they can't represent the exact value of the decimal places in some numbers. This can cause a rounding problem in some business applications.
<<< The eight primitive data types | Index | Equality of floating-point numbers >>> |