Double-precision floating-point (#)

Double-precision floating-point numbers are to Single-precision numbers what Long-integers are to Integers. They take twice as much space in memory (8 bytes versus 4 bytes), but have a greater range (+/- 4.19*10^-307 to 1.79*10^308) and a greater accuracy (15 to 16 digits of precision versus the 6 digits of Single-precision). A Double-precision, 5,000-element array requires 40,000 bytes. An Integer array with the same number of elements occupies only 10,000 bytes. The type-specifier character for a Double-precision floating-point is: #.

Double-precision variables are identified by following the variable name with a Number symbol (i.e., var#) or by using the DEFDBL statement as described in the previous discussion of Integers. You can also declare Double-precision variables using the DOUBLE keyword with the DIM statement. For example:

DIM I AS DOUBLE

C/C++, Delphi, and Visual Basic all offer a double data type that is identical to the PowerBASIC Double-precision variable.

See Also

Array Data Types

Bit Data Types

Constants and Literals

GUID Data Types

Object Data Types

Pointers

User Defined Types

Unions

Variant Data Types