|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2006-08-03 14:52:50
Gennaro Prota wrote:
> On Wed, 2 Aug 2006 14:11:20 +0100, "Paul A Bristow"
> <pbristow_at_[hidden]> wrote:
>
> >But this is STILL the WRONG formula for the number of digits!
> >
> >It should be max_digits10.
> >
> >stream.precision(2 + std::numeric_limits<Source>::digits * 301/1000);
> >
> >PLEASE can we get at long last get this right so that floats can be
> >serialized without losing a few bits.
I have not get a chance to study the subject yet but I wonder why don't
you just set a precision to some huge number, say 32767 or INT_MAX?
> I presume lexical_cast will be totally rewritten not too far in the
> future, to optimize some specific conversions, as also recently
> discussed. That's why I've tended to postpone issues about it. But if
> you really feel strongly about this specific problem (please, say "I
> do so swear" ;-)) I'll give it a thought.
I can merge things ;)
Though I can't promise warnings free code in the first round
of refactoring.
-- Alexander Nasonov Project Manager at Akmosoft ( http://www.akmosoft.com ) Blog: http://nasonov.blogspot.com Email: $(FirstName) dot $(LastName) at gmail dot com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk