This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4943] Inconsistent rounding behaviour for sprintf and IEEE doubles
- From: "vincent+libc at vinc17 dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 23 Sep 2007 19:31:33 -0000
- Subject: [Bug libc/4943] Inconsistent rounding behaviour for sprintf and IEEE doubles
- References: <20070820142205.4943.paul@inet.co.za>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.