public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "guojiufu at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug math/13563] New: LoP asinl returns unexpected value on long double
Date: Thu, 05 Jan 2012 06:56:00 -0000 [thread overview]
Message-ID: <bug-13563-131@http.sourceware.org/bugzilla/> (raw)
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.
next reply other threads:[~2012-01-05 6:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 6:56 guojiufu at gmail dot com [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-13563-131@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).