|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-04-05 05:32:25
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Edward Diener
| Sent: 04 April 2006 21:50
| To: boost_at_[hidden]
| 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_at_[hidden] http://www.hetp.u-net.com/index.html http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk