From: "Boehm, Hans" <hans_boehm@hp.com>
To: "'java@gcc.gnu.org'" <java@gcc.gnu.org>
Cc: "'tromey@redhat.com'" <tromey@redhat.com>
Subject: Problem with interpreted double operations on IA64
Date: Tue, 09 Apr 2002 09:37:00 -0000 [thread overview]
Message-ID: <40700B4C02ABD5119F000090278766443BF19D@hplex1.hpl.hp.com> (raw)
Could someone point me at a description of exactly how type __java_double
should differ from double? As far as I can tell, __java_double is used
primarily by the interpreter? On X86 this seems to work correctly. On IA64
(and perhaps other 64-bit platforms?), it seems to get confused about the
low order bits. This means that "double precision" results in the
interpreter are computed at most to single precision accuracy. Here's a C++
example to demonstrate the issue. Gij runs into the same problems, causing
scimark to fail, etc. (This is with a very recent 3.1 tree.)
[hboehm@plasma ~/tests]$ cat double.cc
#include <stdio.h>
__java_double jdiv (__java_double x, __java_double y) {
return x/y;
}
double div (double x, double y) {
return x/y;
}
int main()
{
__java_double jx=2.0, jy=3.0;
double x=2.0, y=3.0;
double result, jresult;
jresult = jdiv(jx, jy);
result = div(x, y);
printf("%20.15f %20.15f\n", result, jresult);
}
[hboehm@plasma ~/tests]$ g++ double.cc
[hboehm@plasma ~/tests]$ ./a.out
0.666666666666667 0.666666686534882
Hans
next reply other threads:[~2002-04-09 16:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-09 9:37 Boehm, Hans [this message]
2002-04-09 9:43 ` Andrew Haley
2002-04-09 10:51 ` Tom Tromey
2002-04-09 9:43 Boehm, Hans
2002-04-09 10:01 ` Andrew Haley
2002-04-09 10:30 ` Per Bothner
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=40700B4C02ABD5119F000090278766443BF19D@hplex1.hpl.hp.com \
--to=hans_boehm@hp.com \
--cc=java@gcc.gnu.org \
--cc=tromey@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).