Floating-point is a representation system in which a string of digits or bits represents a real number (a number that may have a fractional part).


An example of a floating-point number is 4.5, where the part before the decimal point, 4, is the integer part and .5 is the fractional part.

The name floating-point refers to the fact that the radix point (e.g. decimal point or binary point) can be placed anywhere relative to the digits within the string. The radix point's position is indicated separately in the internal representation of the number.

Floating point representations vary from machine to machine. By far the most common is the IEEE-754 standard. An IEEE-754 float (4 bytes) or double (8 bytes) has three components (there is also an analogous 96-bit extended-precision format under IEEE-854): a sign bit telling whether the number is positive or negative, an exponent giving its order of magnitude, and a mantissa specifying the actual digits of the number.


example GCC C++
Borland C++ Compiler
Java
home Home Page