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 madcoder at debian dot org  2007-09-22 11:15 -------
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.

  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.

> 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.



-- 


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]