Boost logo

Boost :

From: Moore, Paul (paul.moore_at_[hidden])
Date: 2000-11-28 05:38:08


From: d.frey_at_[hidden] [mailto:d.frey_at_[hidden]]
> I agree, that r1 should be the same as r2. But what I was wondering
> about is the following: When I give my compiler the following code
>
> cout << r1;
>
> it prints '0.1' - which is what I *mean*, not the exact value of r1!
> Therefore, some algorithms to handle the conversion must be already
> included in 'cout'.

Simple rounding, probably...

> If we supply a constructor from a string, we won't
> have problems with this those conversion problems:

Gack, no. I'm not parsing all possible floating point representations! That
way lies madness... (I knew someone would suggest it in the end, though, so
you get the prize :-)

Paul.


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