From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e806d6e792a5af1f,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-09-01 10:24:25 PST Path: bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!wupost!crcnis1.unl.edu!csealumni!dwilliss From: dwilliss@csealumni.unl.edu (David Williss) Newsgroups: comp.unix.osf.osf1 Subject: IEEE Floating Point problem Date: 1 Sep 1994 16:43:53 GMT Organization: Dept of CS&E -- University of Nebraska-Lincoln Message-ID: <3450c9$hvg@crcnis1.unl.edu> NNTP-Posting-Host: csealumni.unl.edu Keywords: Exception X-Newsreader: TIN [version 1.2 PL2] I have a problem with floating point on our OSF/1 machine (It's a DEC Alpha). IEEE specifies that the result of dividing anything by 0 should be INF or -INF (depending on the numerator), with the exception that 0/0 and INF/INF are both NaN (Not A Number). On our alpha/OSF/1, These procuded FP Exceptions and exited with a core dump. I found the man page ieee(3), and it gave some suggestions, none of which did what I wanted. If you set it up to ignore SIGFPE, the result of 1/0 is 0 (not INF). It suggested the compiler flag -resumption_safe, which it says will make it produce the correct IEEE result, but it still gives 0. I tried the flag on the cc compiler. gcc doesn't even have the flag. Is there any way to get this to behave correctly? -- David C. Williss #include Software Engineer -- MicroImages, Inc. dwilliss@microimages.com Voice: (402) 477-9562 FAX: (402) 477-9559 dwilliss@csealumni.unl.edu