next up previous contents index
Next: Double Precision Type Up: Data Types Previous: Integer Type

Real Type

  Most scientific applications use the real data type more than anything else. Real values are stored internally using a floating-point representation which gives a larger range than the integer type but the values are not, in general, stored exactly. Both the range and precision are machine dependent.

In practice most machines use at least 32 bits to store real numbers. Many systems now use the IEEE Standard representation: for 32-bit numbers this gives a precision of just over 7 decimal digits and allows a number range from around 10-38 to just over 10+38. This can be something of a limitation because there are many types of calculation, especially in physics and astronomy, which lead to numbers in excess of 1040. Some computers designed expressly for scientific work, sometimes called ``super-computers", allocate 64 bits for real numbers so that the numerical precision is much larger; the range is often larger as well. On such machines it is rarely necessary to use the double precision type.



Helen Rowlands
8/27/1998