DOUBLE
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
DOUBLE variables are 64-bits floating point numerical values up to sixteen digits precision (see IEEE 754 Double precision).
Syntax
- Explicit declaration
- DIM variable AS DOUBLE 'AS type variant
- DIM variable# 'type suffix variant (#)
- Implicit for a specific letter range
- DEFDBL D-E '(legacy variant) all variables beginning with D(d) or E(e)
- _DEFINE D-E AS DOUBLE 'new variant in QB64(PE)
- Implicit without declaration
- variable# 'simply always use the type suffix
Description
- Values can range up to 16 digits. Decimal point accuracy depends on whole value places taken.
- The suffix # can also be placed after a literal numerical value to designate the value as DOUBLE.
- Values may be given as real number (123.456) or scientific notation using D as exponent marker (1.23456D+2).
- PRINT usually takes the shorter of both notations (depending on the value) to output the numbers. In alternative you may use PRINT USING to designate your desired output format.
- Floating decimal point numerical values cannot be _UNSIGNED.
- Values can be converted to 8-bytes STRING values using _MKD$ and back to numbers with _CVD.
- Some useful constants are available since QB64-PE v4.0.0
-
- _SIZE_OF_DOUBLE = 8 'in bytes
- _DOUBLE_MIN# = -1.797693134862315D+308 'smallest normal number
- _DOUBLE_MAX# = 1.797693134862315D+308 'largest normal number
- _DOUBLE_MIN_FRAC# = 2.225073858507201D-308 'smallest normal number closest to zero
Availability
See also