* 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
* Re: Gcc: Conversion of NaN => int
[not found] <199803161451.GAA10632@cesium.transmeta.com>
@ 1998-03-16 15:37 ` Uncle George
0 siblings, 0 replies; 2+ messages in thread
From: Uncle George @ 1998-03-16 15:37 UTC (permalink / raw)
To: redhat-devel-list; +Cc: axp-list
that may, or may not be so. u try to run same pkg's, but get different
results, error messages.
Can i presume that u will get linux/intel to give same error conditions?
gat
H. Peter Anvin wrote:
> No. In fact, SIGFPE is a quite reasonable thing at the very least if
> the value is an SNaN.
^ permalink raw reply [flat|nested] 2+ messages in thread
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 --
[not found] <199803161451.GAA10632@cesium.transmeta.com>
1998-03-16 15:37 ` Gcc: Conversion of NaN => int Uncle George
1998-03-16 13:43 Uncle George
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox