public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/13563] New: LoP asinl returns unexpected value on long double
@ 2012-01-05 6:56 guojiufu at gmail dot com
2012-01-05 8:23 ` [Bug math/13563] " aj at suse dot de
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: guojiufu at gmail dot com @ 2012-01-05 6:56 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Bug #: 13563
Summary: LoP asinl returns unexpected value on long double
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj@suse.de
ReportedBy: guojiufu@gmail.com
Classification: Unclassified
#include <stdio.h>
#include <float.h>
#include <math.h>
typedef union { long double ld; struct{long l1, l2, l3, l4;} s; } U ;
int main(void) {
U u ;
long double arg = (1.L-((__extension__ 0x1p-105L))/(long double)2);
long double a = asinl(arg);
u.ld = arg ;
printf("size of long double=%d long=%d\n", sizeof(long double),
sizeof(long));
printf("%X %X %X %X\n", u.s.l1,u.s.l2,u.s.l3,u.s.l4);
printf("%.30Lg\n",arg);
printf("%.30Lg\n",a);
return 0;
}
> gcc t.c -lm;./a.out
EXPECTED OUTPUT:
size of long double=8 long=4
3FF00000 0 FE97FF4 0
1
1.57079632679489655799898173427
ACTUAL OUTPUT:
size of long double=16 long=4
3FF00000 0 B9500000 0
1
nan <-should be 1.570796326794....
This issue happens at Linux on Power system
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
@ 2012-01-05 8:23 ` aj at suse dot de
2012-01-05 14:45 ` sjmunroe at us dot ibm.com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aj at suse dot de @ 2012-01-05 8:23 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|aj at suse dot de |sjmunroe at us dot ibm.com
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
2012-01-05 8:23 ` [Bug math/13563] " aj at suse dot de
@ 2012-01-05 14:45 ` sjmunroe at us dot ibm.com
2012-01-05 19:19 ` sjmunroe at us dot ibm.com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sjmunroe at us dot ibm.com @ 2012-01-05 14:45 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Steven Munroe <sjmunroe at us dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Steven Munroe <sjmunroe at us dot ibm.com> 2012-01-05 14:44:59 UTC ---
I did not see any info on which distro and release?
But it looks like this is fixed up stream, And the fix is available via the
advance toolchain:
http://ausgsa.ibm.com/projects/p/ppctoolchain/web/public/at/at5.0/suse/SLES_10/
sjmunroe@spokane1:~/src> export PATH=/opt/at5.0/bin:$PATH
sjmunroe@spokane1:~/src> gcc -O2 -g bugz-13563.c -lm -o bugz-13563
sjmunroe@spokane1:~/src> ./bugz-13563
size of long double=16 long=8
0 0 0 37DF8
1
1.57079632679489646222207582326
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
2012-01-05 8:23 ` [Bug math/13563] " aj at suse dot de
2012-01-05 14:45 ` sjmunroe at us dot ibm.com
@ 2012-01-05 19:19 ` sjmunroe at us dot ibm.com
2012-01-24 21:03 ` dflahert at us dot ibm.com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sjmunroe at us dot ibm.com @ 2012-01-05 19:19 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Steven Munroe <sjmunroe at us dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #2 from Steven Munroe <sjmunroe at us dot ibm.com> 2012-01-05 19:19:01 UTC ---
Oops false resolve, seems the GCC-4.6 compiler will optimize the asinl call
away and load the correct const result for -O1 or higher. I see the same
failure when compiled at -O0.
The team will take a closer look.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
` (2 preceding siblings ...)
2012-01-05 19:19 ` sjmunroe at us dot ibm.com
@ 2012-01-24 21:03 ` dflahert at us dot ibm.com
2012-02-16 17:14 ` dflahert at us dot ibm.com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dflahert at us dot ibm.com @ 2012-01-24 21:03 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Dave Flaherty <dflahert at us dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dflahert at us dot ibm.com
--- Comment #3 from Dave Flaherty <dflahert at us dot ibm.com> 2012-01-24 21:02:41 UTC ---
It appears there are a couple issues with this code. The first issue is how
the code is checking for values greater than 1 (or less than -1), and the other
issue is how the code gets the absolute value of the input argument.
Patch and test suite update will be provided shortly.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
` (3 preceding siblings ...)
2012-01-24 21:03 ` dflahert at us dot ibm.com
@ 2012-02-16 17:14 ` dflahert at us dot ibm.com
2012-03-02 0:59 ` jsm28 at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dflahert at us dot ibm.com @ 2012-02-16 17:14 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
--- Comment #4 from Dave Flaherty <dflahert at us dot ibm.com> 2012-02-16 17:13:29 UTC ---
Created attachment 6223
--> http://sourceware.org/bugzilla/attachment.cgi?id=6223
patch with updates to e_asinl.c and libm-test.inc
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl): Updated the |x|
code and specifically check for |x|>1.
* math/libm-test.inc (asin_test): Added a long double and
LDBL_MANT_DIG == 106 test for values near |1|.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
` (4 preceding siblings ...)
2012-02-16 17:14 ` dflahert at us dot ibm.com
@ 2012-03-02 0:59 ` jsm28 at gcc dot gnu.org
2012-05-06 14:44 ` azanella at linux dot vnet.ibm.com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-03-02 0:59 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
--- Comment #5 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-03-02 00:58:24 UTC ---
The patch should be posted to libc-alpha for review.
You shouldn't be updating copyright dates in a copyright notice in the name of
Sun, only those in FSF copyright notices....
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
` (5 preceding siblings ...)
2012-03-02 0:59 ` jsm28 at gcc dot gnu.org
@ 2012-05-06 14:44 ` azanella at linux dot vnet.ibm.com
2012-05-06 14:45 ` azanella at linux dot vnet.ibm.com
2014-06-27 11:16 ` fweimer at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2012-05-06 14:44 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |azanella at linux dot
| |vnet.ibm.com
--- Comment #6 from Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> 2012-05-06 14:43:27 UTC ---
Commit '31dc8730af585d8e13021484752fb20decae0661' fixes this and also the same
issue for acosl. My patch corrects the case for value near '1' that depends on
both double and also for every comparison using the wrong absolute value for
'x'.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
` (6 preceding siblings ...)
2012-05-06 14:44 ` azanella at linux dot vnet.ibm.com
@ 2012-05-06 14:45 ` azanella at linux dot vnet.ibm.com
2014-06-27 11:16 ` fweimer at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: azanella at linux dot vnet.ibm.com @ 2012-05-06 14:45 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13563
Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Adhemerval Zanella Netto <azanella at linux dot vnet.ibm.com> 2012-05-06 14:44:30 UTC ---
Fixed by commit '31dc8730af585d8e13021484752fb20decae0661'.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug math/13563] LoP asinl returns unexpected value on long double
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
` (7 preceding siblings ...)
2012-05-06 14:45 ` azanella at linux dot vnet.ibm.com
@ 2014-06-27 11:16 ` fweimer at redhat dot com
8 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 11:16 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=13563
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-27 11:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 6:56 [Bug math/13563] New: LoP asinl returns unexpected value on long double guojiufu at gmail dot com
2012-01-05 8:23 ` [Bug math/13563] " aj at suse dot de
2012-01-05 14:45 ` sjmunroe at us dot ibm.com
2012-01-05 19:19 ` sjmunroe at us dot ibm.com
2012-01-24 21:03 ` dflahert at us dot ibm.com
2012-02-16 17:14 ` dflahert at us dot ibm.com
2012-03-02 0:59 ` jsm28 at gcc dot gnu.org
2012-05-06 14:44 ` azanella at linux dot vnet.ibm.com
2012-05-06 14:45 ` azanella at linux dot vnet.ibm.com
2014-06-27 11:16 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).