Java includes the
which hold floating point numbers.
When written with characters, floating point numbers include a decimal point
followed by a decimal fraction.
But (of course),
inside the computer floating point numbers are represented with bit patterns,
as is all data.
All of the familiar mathematical functions such as
sine, log, and square root
are available to your program in the Java
These functions usually use arguments of type
and usually return values of type
Note: the character that is used to separate the whole part of the number from the fractional part depends on what country you are in. In the U.S. (and other countries with a historical tie to England) a dot is used. In many other countries (most of Europe and South America) a comma is used. These notes use a dot.
Which uses more bits: a Java
float or a Java