Re: How to "print" a "double" ?
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Tue, 31 Mar 2009 11:07:09 -0400
Jean-Marc Bourguet wrote:
Xavier Roche <xroche@xxxxxxxxxxxxxxxxxxxxxx> writes:
If there is no other way, I suppose that "%.16lf" is the lesser evil, but
definitely not a clean solution.
%.16lg would be better as it won't round to 0 value below 5e-17.
For another possibility, consider using frexp() to split the
floating-point value into an integer exponent and a normalized
fraction and printing them separately.
--
Eric.Sosman@xxxxxxx
.
- References:
- How to "print" a "double" ?
- From: Xavier Roche
- Re: How to "print" a "double" ?
- From: Jean-Marc Bourguet
- How to "print" a "double" ?
- Prev by Date: Re: How to "print" a "double" ?
- Next by Date: Re: How to "print" a "double" ?
- Previous by thread: Re: How to "print" a "double" ?
- Index(es):
Relevant Pages
|