Use fewer digits for floating-point constants

Change from 21, which is DECIMAL_DIG on platforms with 80-bit long
double, to 9 for float and 17 for double (and long double, which is the
same as double on asmjs-unknown-emscripten), which are the actual number
of decimal digits needed for those types.