Chapter 3. The Floating-Point Standard
Chapter 1 covered floating-point numbers and floating-point arithmetic in general. This chapter gets into the details of how Java implements floating point and how well it adheres to the IEEE 754 floating-point standard.[1] We'll begin to understand the behavior of Java's float
and double
types.
The Floating-Point Formats
Before the IEEE 754 standard was published in 1985, there were many different floating-point formats which the computer manufacturers implemented in hardware and software. It was difficult to port programs that did numerical computations from one machine platform to another—the computed results would vary. Most computer hardware manufacturers today adhere to the IEEE 754 standard, and to various ...
Get Java™ Number Cruncher: The Java Programmer's Guide to Numerical Computing now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.