Extended-precision floating-point numbers
are the basis of
In PowerBASIC, arithmetic is optimized; it doesn't use Extended-precision
unless it needs to. Extended-precision has been provided as a declarable
Extended-precision values require 10 bytes of storage each. They have a range of approximately +/- 3.4*10^-4932 to 1.2*10^4932, and offer 18 digits of precision. All 18 digits can be "displayed" using the extended STR$ format (eg, STR$(var##,18)).
Extended-precision variables are identified by adding two Number symbols following a variable name (i.e., var##) or by using the DEFEXT statement.. You can also declare Extended-precision variables using the EXT or EXTENDED keywords with the DIM statement. For example:
DIM I AS EXT
DIM J AS EXTENDED
STR$ works with up to 16 significant digits (enough
for a Double-precision value) by default. To get all 18 significant
digits of an Extended-precision number in a
x$ = STR$(a##,18)
See Also