|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-05-03 16:43:52
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Andras Erdei
| Sent: 03 May 2006 21:24
| To: boost_at_[hidden]
| Subject: Re:
| [boost][serialization]Serialisation/deserialisationoffloating
| -point values
|
| On 5/2/06, Paul A Bristow <pbristow_at_[hidden]> wrote:
| >
| > IMO The real issue here is not whether round-tripping
| should work, but that
| > input from a long enough decimal digit string should
| always give you the nearest floating-point representation.
| >
| > For float this is true, and for double is almost (but not quite) true.
|
| [i've only read the abstract below, not the whole article,
|
| William D. Clinger
| How to read floating point numbers accurately Proceedings
| of the ACM SIGPLAN 1990 conference on Programming language
| design and implementation
I've actually read the article!
- though I must confess I didn't understand it all ;-(
However 'correct' input seems to be achieved by gcc,
and by MSVC for float, and almost for double.
So I stick to my guess that it is a bug.
It shouldn't be a feature IMO.
But I don't think there is anything that we should do (except be aware of
the potential problem).
It is up to Microsoft and/or Dinkumware to do nothing or resolve.
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk