CDBL Function
----------------------------------------------------------------------------
Action
Converts a numeric expression to a double-precision value.
Syntax
CDBL( numeric-expression)
Remarks
The argument numeric-expression can be any numeric expression. This
function has the same effect as assigning the numeric expression to a
double-precision variable.
The results of CDBL are no more accurate than the original expression. The
added digits of precision are not significant unless the expression is
calculated with double-precision accuracy.
See Also
CCUR, CINT, CLNG, CSNG
Example
The following example demonstrates how the precision of the argument affects
the value returned by CDBL.
X = 7-9
X# = 7-9
PRINT X
' Both X# and CDBL(X) will be accurate to only 7 decimal
' places, because 7-9 is evaluated in single precision.
PRINT X#
PRINT CDBL(X)
PRINT 7#-9#' Accurate to 15 decimal places.
Output
.7777778
.7777777910232544
.7777777910232544
.7777777777777778