gdouble afdal_decimal_get_double AfDalDecimal decimal,
gboolean *  success
 

Get current double representation for the given AfDalDecimal value.

This function doesn't not ensure that the double representation is the same as the decimal received. If you expect to have the exact precision you should consider to avoid using this function.

You must check success value to test if the conversion has been performed. Here is an example:

     AfDalDecimal * decimal = afdal_decimal_new ("16.0");
     gboolean       success;
     gdouble        value;

     value = afdal_decimal_get_double (decimal, &success);
     if (! success) {
           g_print ("Decimal conversion has failed!\n");
     }else {
           g_print ("Decimal convesion ok, from %s to %g\n",
                    afdal_decimal_stringfy (decimal),
                    value);
     }

Parameters:
decimal The decimal value to get double value from.
success A boolean reference to report conversion status.
Returns:
A double value or -1 if