Float

Revision as of 22:03, 12 December 2008 by I like pie (talk | contribs)

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 $10\textsuperscript{exponent}$ 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.

Invalid username
Login to AoPS