/* Gconvert:
* This preprocessor macro is defined to convert a floating point
* number to a string without a . This
* emulates the behavior of sprintf("%g"), but is sometimes much more
* efficient. If gconvert() is not available, but gcvt() drops the
* trailing decimal point, then gcvt() is used. If all else fails,
* a macro using sprintf("%g") is used. Arguments for the Gconvert
* macro are: value, number of digits, whether trailing zeros should
* be retained, and the output buffer.
* The usual values are:
* d_Gconvert='gconvert((x),(n),(t),(b))'
* d_Gconvert='gcvt((x),(n),(b))'
* d_Gconvert='sprintf((b),"%.*g",(n),(x))'
* The last two assume trailing zeros should not be kept.
*/
####
$ perl -le 'printf "%.54g\n", 0.3;'
0.29999999999999999
##
##
0.299999999999999988897769753748434595763683319091796875