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 vincent+libc at vinc17 dot org  2007-09-23 19:31 -------
(In reply to comment #29)
> 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 have said *decimal* arithmetic, not arbitrary precision arithmetic.

And FYI, your program fails to work correctly on my Linux/ppc machine:

5000.524999999999636 = 5000.53
2596.625000000000000 = 2596.62
2596.525000000000091 = 2596.52
-8.500000000000000 = -8
-7.500000000000000 = -8
-6.500000000000000 = -7
-5.500000000000000 = -6
-4.500000000000000 = -5
-3.500000000000000 = -3
-2.500000000000000 = -2
-1.500000000000000 = -1
-0.500000000000000 = -0
0.500000000000000 = 0
1.500000000000000 = 1
2.500000000000000 = 2
3.500000000000000 = 3
4.500000000000000 = 5
5.500000000000000 = 6
6.500000000000000 = 7
7.500000000000000 = 8
8.500000000000000 = 8
-8.500000000000000 = -8.500000000000030000000000
-7.500000000000000 = -7.500000000000040000000007
-6.500000000000000 = -6.500000000000040000000007
-5.500000000000000 = -5.500000000000030000000007
-4.500000000000000 = -4.500000000000030000000007
-3.500000000000000 = -3.500000000000010000000000
-2.500000000000000 = -2.500000000000010000000000
-1.500000000000000 = -1.500000000000000000000000
-0.500000000000000 = -0.500000000000000000000000
0.500000000000000 = 0.500000000000000000000000
1.500000000000000 = 1.500000000000000000000000
2.500000000000000 = 2.500000000000010000000000
3.500000000000000 = 3.500000000000010000000000
4.500000000000000 = 4.500000000000030000000007
5.500000000000000 = 5.500000000000030000000007
6.500000000000000 = 6.500000000000040000000007
7.500000000000000 = 7.500000000000040000000007
8.500000000000000 = 8.500000000000030000000000

-- 


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]