Boost logo

Boost :

Subject: Re: [boost] [serialization] How are floating point values handled?
From: Petr Machata (pmachata_at_[hidden])
Date: 2013-08-14 14:45:52


"John Maddock" <john_at_[hidden]> writes:

> I would have thought it would be better for the serialization lib to
> set the stream precision before outputting a primitive type - to
> std::numeric_limits<T>::max_digits10 (or
> std::numeric_limits<T>::digits10+2 if max_digits10 is not available).
> However, I recognize that this is a difficult issue!

Would dumping the floating point value in hexadecimal format be a
solution? I mean what %a does in C99 printf. Then we wouldn't lose any
precision.

Thanks,
PM


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk