The dectodbl() function

The dectodbl() function converts a decimal type number into a C double type number.

Syntax

mint dectodbl(dec_val, dbl_val)
   dec_t *dec_val;
   double *dbl_val;
dec_val
A pointer to the decimal structure that contains the value to convert to a double value.
dbl_val
A pointer to a double variable to contain the result of the conversion.

Usage

The floating-point format of the host computer can result in loss of precision in the conversion of a decimal type number to a double type number.

Return values

0
The conversion was successful.
<0
The conversion failed.