This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4943] Inconsistent rounding behaviour for sprintf and IEEE doubles


------- Additional Comments From paul at inet dot co dot za  2007-09-23 10:20 -------
(In reply to comment #28)
> (In reply to comment #27)
> > Sorry, Vincent, but I do not agree with that bit of blurb.  The actual value
> > when written in decimal cannot take more than 15 decimal digits into
> > consideration.  The correct way to interpret the value is 
> >     5000.524999999999636 == 5000.52499999999 
> > with a possible error of
> >        0.000000000009636
> 
> This is ridiculous and shows that you still haven't understood anything.

... and your comment shows that you have a very biased and narrow perspective.

> 
> > For now, it seems that a pocket calculator does a better job of converting
> > binary floating point to decimal text representation than either GLibC,
> > MSVCRT.DLL or Vincent Lefèvre .
> 
> FYI, most pocket calculators use decimal arithmetic, thus do not do any binary
> <-> decimal conversion. But now, I hope that you understand at least that you
> need decimal arithmetic.

I have stated repeatedly, that FP arithmetic is just fine for me.  Why do you
insist that I need to use an arb precision library?  I do not need more than 15
(In fact I need no more than 10) significant decimal digits in my calculations,
which IEEE double supposedly provides.

My problem is not with the binary representation of the number;  it is with the
apparently incompetent conversion of those numbers to ascii text representation
inside a buffer for display.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4943

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]