Anthony Liguori wrote:
> After checking that we can demarshal, marshal again and compared to
> the expected decoded value.  This doesn't work so well for floats
> because they cannot be accurately represented in decimal but we try
> our best.

Good sprintf/scanf/strtod implementations do guarantee that what's
printed and then parsed gets back the same floating point value, as
long as you have printed sufficient decimal digits.

I'm not sure if FLT_DIG/DLB_DIG are the right number of digits,
though.  Glibc's documentation of those is confusing and they might
mean something a little different.

-- Jamie


Reply via email to