Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Gcc: Conversion of NaN => int
@ 1998-03-16 13:43 Uncle George
  0 siblings, 0 replies; 2+ messages in thread
From: Uncle George @ 1998-03-16 13:43 UTC (permalink / raw)
  To: axp-list@redhat.com; +Cc: redhat-devel-list@redhat.com

this simple routine gives a floating point exception on my alpha/LX. it
doesn't help if u use the -mieee switch.
APARENTLY float conversion instructions are not SOFTWARE TRAPED!!!

this same routine does not give a SIGFPE on a 386 box, but if u examine
"i" u will see
that there is an 0x80000000 there ( where i expected a 0 ).

Are there ieee float rules for convertint NAN/INF float/doubles to
long/int?
gat

main()
{
 float f, a,b;
 int i;
 a = 0.; b = 0.;
 f = a/b;  /* f = NaN */
 i = (int)f;  /* Conversion gets SIGFPE! */
}



^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <199803161451.GAA10632@cesium.transmeta.com>]

end of thread, other threads:[~1998-03-16 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-16 13:43 Gcc: Conversion of NaN => int Uncle George
     [not found] <199803161451.GAA10632@cesium.transmeta.com>
1998-03-16 15:37 ` Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox