Web lists-archives.com

Re: [Mingw-users] msvcrt printf bug

On Saturday, January 14, 2017 10:17 AM, KHMan wrote:
> On 1/14/2017 10:02 PM, tei.andu@xxxxxxxxxxxx wrote:
>> Hello,
>> I encountered a loss of precision printing a float with C printf.
>> For values greater than or equal to 1.743397235870361328125 * 2 ^
>> 59 (0x5D5F27A4) the printed value is slightly wrong. The error
>> increases with increasing input.

> The output is fine. When the 32 bit float is converted into 64
> bits and then printed, it should be accurate up to about 17
> digits. I would not trust anything beyond 17 digits with my
> favorite teddy bear.
> Why should one expect 19 digits of precision? Also, one should not
> expect 8087's extended precision registers to be used anymore
> unless it is explicitly required.

You have skillfully avoided addressing the fact that it works as the
original poster expects with glibc 2.2.5 (tested on Linux / glibc 2.19).

John Brown..
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe