created: 02/15/98; revised: 07/31/99, 01/18/00, 06/01/00, 05/11/03, 01/13/06
The Java primitive types include the
floating point types float
and double
.
Floating point numbers are those that include a fractional part.
When written for human viewing, a floating point number includes a decimal point.
For example, 3.14159
and -0.718802
.
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 typically expect floating point data.
Which uses more bits: a Java float
or a a Java double
.