Floating point
A floating-point number is a digital representation for a number in a certain subset of the rational numbers, and is often used to approximate an arbitrary real number on a computer. In particular, it represents an integer or fixed-point number (the significand or, informally, the mantissa) multiplied by a base (usually 2 in computers) to some integer power (the exponent). When the base is 2, it is the binary analogue of scientific notation (in base 10).
Related Topics:
Digital - Rational numbers - Real number - Computer - Fixed-point - Significand - Exponent - Scientific notation
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
A floating-point calculation is an arithmetic calculation done with floating-point numbers and often involves some approximation or rounding because the result of an operation may not be exactly representable.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
A floating-point number a can be represented by two numbers m and e, such that a = m × be.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
In any such system we pick a base b (called the base of numeration, also the radix) and a precision p (how many digits to store).
Related Topics:
Radix - Precision
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
m (which is called the significand or, informally, mantissa) is a p digit number of the form ±d.ddd...ddd (each digit being an integer between 0 and b−1 inclusive). If the leading digit of m is non-zero then the number is said to be normalized. Some descriptions use a separate sign bit (s, which represents −1 or +1) and require m to be positive.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
e is called the exponent.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This scheme allows a large range of magnitudes to be represented within a given size of field, which is not possible in a fixed-point notation.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
As an example, a floating-point number with four decimal digits (b = 10, p = 4) and an exponent range of ±4 could be used to represent 43210, 4.321, or 0.0004321, but would not have enough precision to represent 432.123 and 43212.3 (which would have to be rounded to 432.1 and 43210). Of course, in practice, the number of digits is usually larger than four.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
In addition, floating-point representations often include the special values +∞, −∞ (positive and negative infinity), and NaN ('Not a Number'). Infinities are used when results are too large to be represented, and NaNs indicate an invalid operation or undefined result.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | Usage in computing |
| ► | Problems with floating-point |
| ► | Properties of floating point arithmetic |
| ► | IEEE standard |
| ► | Examples |
| ► | See also |
| ► | References |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.
