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...) |
m |
||
(One intermediate revision by one other user not shown) | |||
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. | |
− | [[ | + | ==See Also== |
+ | *[[Floating point number]]s for more detail, particularly as they apply to [[Python]]. | ||
{{stub}} | {{stub}} | ||
+ | [[Category:Datatypes]] |
Latest revision as of 15:08, 10 March 2011
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.
See Also
- Floating point numbers for more detail, particularly as they apply to Python.
This article is a stub. Help us out by expanding it.