
| -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of Edward Diener | Sent: 04 April 2006 21:50 | To: boost@lists.boost.org | Subject: Re: [boost] [serialization] | Serialisation/deserialisation offloating-point values | > I suspect that the Fair Dinkumware version may be corrected | already - would | > anyone like to test? | | What is Fair Dinkumware ? See www.dinkumware.com for the origin of their company name. "Fair dinkum" is Australian for "genuine" "kosher" "authentic" ... Their pay-extra for software from MS usually contains later corrections. So those who fear trouble with serialization of doubles might try throwing money at the problem. Perhaps some Booster is using Dinkumware Library and would like to test? A quick test shows the problem: #include <iostream> #include <sstream> #include <cassert> int main () { std::stringstream stream; double orig_value = 0.0019075645054089487; stream.precision(17); // max_digits10 for double stream << orig_value; // write out. double num; stream >> num; // read back assert (num == orig_value); // should be the same! } and my test program explores it more fully - mail me for a copy. Paul -- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204 mailto: pbristow@hetp.u-net.com http://www.hetp.u-net.com/index.html http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html