public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Irix6 casting long double to double yields bogus results
@ 2003-01-29 19:06 Kaveh R. Ghazi
  2003-01-30  9:05 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Kaveh R. Ghazi @ 2003-01-29 19:06 UTC (permalink / raw)
  To: aoliva; +Cc: gcc-bugs, gcc

Alex,

I've been running some tests on irix6 floating point and noticed a
problem.  Casting from long double to double seems to be broken now.
Thoughts?

		Thanks,
		--Kaveh

%cat foo.c
#include <stdio.h>

int main()
{
  long double a = 1234.5678L, b = 1234.5678L;
  double c = 1234.5678;

  printf ("%f %Lf %f\n", (double) a, b, c);
  return 0;
}
%gcc -v
Reading specs from /var/tmp/gcc-testing/branch/build/gcc/specs
Configured with: ../egcc-3.3-CVS20030129/configure --verbose
  --enable-languages=c,objc,c++,f77,java
Thread model: single
gcc version 3.3 20030129 (prerelease)
%gcc -Wformat foo.c
%./a.out
1834810029.000000 1234.567800 1234.567800

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-03 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-29 19:06 Irix6 casting long double to double yields bogus results Kaveh R. Ghazi
2003-01-30  9:05 ` Alexandre Oliva
2003-01-30 18:33   ` Kaveh R. Ghazi
2003-02-03 13:29     ` Alexandre Oliva

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).