Java Number Cruncher: The Java Programmer's Guide to Numerical Computing By Ronald Mak
Table of Contents
Chapter 1. Floating-Point Numbers Are Not Real!
We've seen how the floating-point numbers can get us into trouble if we're not careful. We may reasonably conclude that, at best, the floating-point numbers are only a crude simulation of the real number system. It's quite amazing that we can make them work as well as they do, as we'll see in the following chapters. But what about the integer numbers?
Java represents the whole numbers with integer types. Integer numbers are certainly simpler and generally faster than floating-point numbers in computations , but are they absolutely safe to use? Of course they're not. After all, we are dealing with computers here. We'll examine the integer types in detail in the next chapter before we return to floating-point numbers in Chapter 3.