Re: Rounding double
jacob navia wrote:
Your program assumes that long long is guaranteed to be sufficiently
large to store the longest integer representable as a double. The use
you made of DBL_DIG doesn't cover the problems that can occur if that
assumption is false, as it is allowed to be for conforming
implementations of C which do not #define __STDC_IEC559__ .
When are you planning on acknowledging that point? I'm getting pretty
tire of typing the name of that macro.
jacob navia wrote:
James Kuyper wrote:
>
I changed my function to use DBL_DIG already. See elsethread
>jacob navia wrote:
>...
>>
>Citation please? Where does the C standard impose such requirements
>for all implementations ?
>...
>>This is perfectly OK since double has only 16 decimal digits,
>>and the first ones in your result appear at 1e-21 (if I counted
>>and the first ones in your result appear at 1e-21 (if I counted
>Citation please? Where does the C standard impose such requirements
>for all implementations ?
I changed my function to use DBL_DIG already. See elsethread
large to store the longest integer representable as a double. The use
you made of DBL_DIG doesn't cover the problems that can occur if that
assumption is false, as it is allowed to be for conforming
implementations of C which do not #define __STDC_IEC559__ .
When are you planning on acknowledging that point? I'm getting pretty
tire of typing the name of that macro.
Comment