June 2004
Intermediate to advanced
992 pages
37h 55m
English

The main consideration in using floating-point numbers is that many fractional decimal numbers can't be represented accurately using the 1s and 0s available on a digital computer. Nonterminating decimals like 1/3 or 1/7 can usually be represented to only 7 or 15 digits of accuracy. In my version of Microsoft Visual Basic, a 32-bit floating-point representation of 1/3 equals 0.33333330. It's accurate to 7 digits. This is accurate enough for most purposes but inaccurate enough to trick you sometimes.
Following are a few specific guidelines for using floating-point numbers:
Avoid additions and subtractions on numbers that have ...
Read now
Unlock full access