Web lists-archives.com

Re: [Mingw-users] msvcrt printf bug




On 1/18/2017 6:27 AM, tei.andu@xxxxxxxxxxxx wrote:
> Hello all,
> Thank you for your kind advice and your time. I also did some more
> searching around.
> I understand that there is no practicality to getting the exact
> value of a float, only enough precision
> that can give a back conversion (decimal string -> float) with the
> same value is required.
> However, my examples are correct. You can verify them with a
> calculator with enough precision or a bignum library (or glibc).
> If you google 'exact value of a float' you will even find code
> samples that will do that. glibc also does it. The digits are not
> garbage, they are the result of a complete conversion.
[snip snip]

Ultimately, you bear the risks. If you are still a student, be 
humble, study more. Think before you cry wolf.

> http://stackoverflow.com/questions/3215235/how-do-you-print-the-exact-value-of-a-floating-point-number
> There is no rounding required if we want this exact value, no
> floating point operations required,
[snip snip]

The blog post states there were ZERO errors doing round trips. No 
errors. What bug?

Google may have smart people laser focused on the wrong things 
too. Do not trust too easily.

So he wants to find perfection in ASCII displays of floats. 
Yawn... Google and Google employees have money, leave them to play...

Once you do calculations in floating point, whatever 0.5ULP does 
not matter anymore, error accumulates, the perfect ASCII display 
is an exercise in perfectionism. Go and have fun with the 
so-called perfect conversion code, however dubious its real-world 
value is, but it's foolish to tell the world there are bugs here 
and there. Think before you act, man.

IIRC you should not consider your kind of perfect ASCII conversion 
to be of any real importance in real world settings. There was 
once an article -- a grad student doing aerospace, his program was 
so sensitive to tiny pertubations that he only got useful *cough* 
'results' on a particular CPU. Other CPUs gave wildly different 
results. After graduating, he questioned whether the program which 
was supposed to produce consistently reproducible results was 
actually useful if it amplified tiny variations in calculations 
and made a molehill out of them. Was his research results good 
valuable simulation or a molehill? Hmmm...

Error accumulates in real world calculations. Folks who enjoy 
their perfect ASCII conversions should remain in their niche.

[snip snip]

-- 
Cheers,
Kein-Hong Man (esq.)
Selangor, Malaysia


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
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:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe