# Difference between revisions of "Float"

(New page: The '''Float''' datatype is a type of computing variable. It has three parts: the mantissa, the exponent, and the sign. The mantissa is the number itself. It is raised...) |
I like pie (talk | contribs) |
||

Line 1: | Line 1: | ||

− | The ''' | + | The '''float''' [[datatype]] is a type of computing [[variable]]. It has three parts: the [[mantissa]], the [[exponent]], and the [[sign]]. |

− | |||

− | |||

+ | The mantissa is the number itself; it is multiplied by <math>10\textsuperscript{exponent}</math> to get the actual number represented by this float. The sign determines whether the number is positive or negative. | ||

== Advantages and Disadvantages with [[Fixed]] Datatype == | == Advantages and Disadvantages with [[Fixed]] Datatype == | ||

Advantages: | Advantages: | ||

− | Float has a significantly larger range of numbers than fixed. | + | *Float has a significantly larger range of numbers than fixed. For example, 123450000000 and 0.00012345 take up the same space. |

− | It is an important metric in measuring computational power (in [[FLOPS]]) | + | *It is an important metric in measuring computational power (in [[FLOPS]]). |

Disadvantages: | Disadvantages: | ||

− | Float | + | *Float must take up a slightly larger amount of space than fixed in order to exercise its full potential. |

− | + | *With floats, there is a possibility of low-precision rounding. | |

+ | {{stub}} | ||

[[Category:Datatypes]] | [[Category:Datatypes]] | ||

− | |||

− |

## Revision as of 22:03, 12 December 2008

The **float** datatype is a type of computing variable. It has three parts: the mantissa, the exponent, and the sign.

The mantissa is the number itself; it is multiplied by to get the actual number represented by this float. The sign determines whether the number is positive or negative.

## Advantages and Disadvantages with Fixed Datatype

Advantages:

- Float has a significantly larger range of numbers than fixed. For example, 123450000000 and 0.00012345 take up the same space.

- It is an important metric in measuring computational power (in FLOPS).

Disadvantages:

- Float must take up a slightly larger amount of space than fixed in order to exercise its full potential.

- With floats, there is a possibility of low-precision rounding.

*This article is a stub. Help us out by expanding it.*