Serialize floats and doubles in a format that does not lose precision.