Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Need help with FPE control
@ 1994-11-07  0:11 Ian Searle
  1994-11-07 15:26 ` Burkhard Neidecker-Lutz
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Searle @ 1994-11-07  0:11 UTC (permalink / raw)


I have been trying to set up a C program on a DEC-Alpha running OSF so
that the following will behave properly (ala IEEE-754)

	1/0 + 1 => Inf

I can get the Alpha to ignore the FPE, or use my own signal handler,
but I cannot get it to work properly with Infs and NaNs.

I have been using the compiler flag -resumption_safe, and 
ieee_fp_get_control() and ieee_fp_set_control() all to no avail.

Can anybody offer some help?

Thanks in advance
--
Ian Searle
ian@flash.ds.boeing.com


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

* Re: Need help with FPE control
  1994-11-07  0:11 Need help with FPE control Ian Searle
@ 1994-11-07 15:26 ` Burkhard Neidecker-Lutz
  0 siblings, 0 replies; 2+ messages in thread
From: Burkhard Neidecker-Lutz @ 1994-11-07 15:26 UTC (permalink / raw)


In article <CyvF71.CoH@plato.ds.boeing.com> ian@flash.ds.boeing.com (Ian Searle) writes:
>I have been trying to set up a C program on a DEC-Alpha running OSF so
>that the following will behave properly (ala IEEE-754)
>
>	1/0 + 1 => Inf
>
>I can get the Alpha to ignore the FPE, or use my own signal handler,
>but I cannot get it to work properly with Infs and NaNs.
>
>I have been using the compiler flag -resumption_safe, and 
>ieee_fp_get_control() and ieee_fp_set_control() all to no avail.

Mmh. Works for me.

% uname -a
OSF1 sand2.kar.dec.com V3.0 347 alpha
% cat a.c
#include <stdio.h>

main(argc,argv)
int argc;
char *argv[];
{
  double a , b;

  a = 1.0;
  b = 0.0;

  printf("%f\n", a/b + a);
}
% cc -ieee_with_no_inexact a.c
./a.out
% ./a.out
INF

		Burkhard Neidecker-Lutz

GLASS Project, CEC Karlsruhe 
Advanced Technology Group, Digital Equipment Corporation
neideck@nestvx.enet.dec.com



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

end of thread, other threads:[~1994-11-07 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-11-07  0:11 Need help with FPE control Ian Searle
1994-11-07 15:26 ` Burkhard Neidecker-Lutz

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