This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
"1 + -1" when rounding to -inf
- From: David Miller <davem at davemloft dot net>
- To: joseph at codesourcery dot com
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 21 Apr 2014 14:51:26 -0400 (EDT)
- Subject: "1 + -1" when rounding to -inf
- Authentication-results: sourceware.org; auth=none
[ Resending this as I got the libc-alpha address wrong the first time
around. ]
What is the result of this supposed to be? Is it "-0.0"?
Here's why I'm asking. log1p_downward(-1) is failing on sparc for
"long double" giving INF instead of -INF.
I wrote a simple test program and, with FE_DOWNWARD, the sequence is:
-1 + 1 == -0.0L
-1L / -0.0L == INF
Any insight into what should be happening here would be appreciated.