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-22 11:39 -------
(In reply to comment #22)
> Subject: Re:  Inconsistent rounding behaviour for sprintf and IEEE doubles
> 
> On Sat, Sep 22, 2007 at 02:55:50PM +0000, paul at inet dot co dot za wrote:
> > Was all the shouting to try to stop me from pointing out something important
> > that you folks are clearly missing? No amount of shouting is going to change the
> > fact that IEEE doubles store at most 15 digits precisely.
> 
>   Okay, you definitely don't understand floating point arithmetics. The
> fact that a floating number is 15 digits precitions means that you can
> store whichever 15 significant digits into your value, the resulting
> stored value will be different if those 15 digits are different. Meaning
> that up to 15 significant values, the operations that takes a given
> number, and computes its IEEE 754 representation is injective.
> 
>   IT DOES NOT ASSURE THAT AFTER THOSE 15 DIGITS, THE OTHER DIGITS ARE
> SET TO 0. If you belive so, you never ever understood what IEEE 754 is
> about.

I never said that the other digits are set to zero.  I said that they represent
the error.  All IEEE doubles are stored to exactly the same precision of 15
decimal places, and are accurate to that point.

Since they represent the error, only the first 15 digits are pertinent to text
conversions.

Oh... and please hold with the "you don't understand floating point" stuff.  It
is irritating, and I understand perfectly well, thank you.

>   When you store your number, the real value has a 909 after the 15th
> significant digit. And it's exactly the whole point of the discussion:
> YOU SHOULD NOT USE FLOATING POINT FOR FINANCIAL AND OTHER EXACT VALUES.
> That's what fixed point is for.

... another repeating theme "You should not be using floating point" is another
irritation and completely irrelevant.  "Should not be using the GNU C library
for floating point" might be closer to the truth.

Floating point is precise enough for me, as I have already stated.  I am not
concerned about accuracy of calculations here,  it is text representation which
concerns me.

> > How about you pass this along to someone you know who may be competent
> > in mathematics, who will verify what I am saying, rather than just
> > sprouting at the gills.
> 
>   I know someone called Vincent Lefèvre. And for the record, in France
> IEEE 754 numbers are teached in MS, and I've a MS in Computer Science,
> so I pretty much know what I'm talking about, thank you.

Vincent has been extraordinarily good at discussing this query.  If you do not
want me questioning your competence, please do not question mine.  It always
seems the last resort in these discussions: "if you don't agree with him, but
cannot argue his point, try to discredit him."


-- 


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]