go to home page   hear noise   go to next page

created: 02/15/98; revised: 07/31/99, 01/18/00, 06/01/00, 05/11/03, 01/13/06

CHAPTER 11 — Floating Point

Java includes the primitive types float and double, which hold floating point numbers. When converted to characters, floating point numbers include a decimal point followed by a decimal fraction. For example, 3.14159 and -0.718802.

Chapter Topics:

All of the familiar mathematical functions such as sine, log, and square root are available to your program in the Java Math class. These functions usually use arguments of type double, and usually return values of type double.

QUESTION 1:

Which uses more bits: a Java float or a a Java double ?