From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <9704100714.AA16206@falcon.comm.eng.osaka-u.ac.jp> Date: Thu, 10 Apr 1997 13:41:24 +0200 From: Olaf Flebbe Subject: SIGFPE Randy, [I did the first IEEE FPU exception things on linux/x86] Don't do a signal handler on SIGFPE, it will not work most of the time. On Intel processorcs the Floating point unit is decoupled from the Integer Unit. You will raise an floating point exception, (the kernel will send you a SIGFPE if you trigger souch a thing) if you access the floating point unit the next time *after* the exception occurs. Incidently gcc produces code which mixes up integer and floating point operations (for performance reasons) and therefore you will get an Exception at unpredictable times later in your code. [ In your code it will happen deep in the printf library code]. So don't to this, the argument may be correctly for other cpu/compiler combinations. The IEEE754 states that no signal should be raised on invalid operations. They defined a set of pseudo numbers which define the outcome of an invalid operations like 1./0. [BTW this is INF]. You are free to implement exception handlers and such things, but these should the default behaviour. Speaking for linux/x86: For new libraries (Version ~>5.1) the IEEE754 style is the default. [And the library -lieee is obsolete] Linux/alpha should handle it correctly, not the JDK. I don't know the alpha, but on x86 it is an issue of correctly initialising the FPU. Olaf -- Dr. Olaf Flebbe Phone +49 (0)7071-9457-32 science + computing gmbh FAX +49 (0)7071-9457-27 Hagellocher Weg 71 D-72070 Tuebingen Email: o.flebbe@science-computing.de PGP fingerprint = 56 FC 74 F7 31 FE 49 13 31 12 6F E5 B9 04 1E 02 -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com