From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,753e8a1dde5c68a2,start X-Google-Attributes: gid111c93,public From: hinsen@cnrs-orleans.fr Subject: Re: Floating point exceptions Date: 1999/09/23 Message-ID: <7sdiab$bas$1@nnrp1.deja.com>#1/1 X-Deja-AN: 528512569 X-Http-Proxy: 1.0 x34.deja.com:80 (Squid/1.1.22) for client 163.9.6.107 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu Sep 23 15:51:45 1999 GMT X-MyDeja-Info: XMYDJUIDhinsen Newsgroups: comp.os.linux.alpha X-Http-User-Agent: Mozilla/4.08 [en] (X11; I; Linux 2.0.36 i686) Joerg Schmalzl writes: > Konrad Hinsen wrote: > > > > RedHat 6.0, and I get lots of crashes. It seems that the math library > > generates a floating point exception in many cases (e.g. log(-1.)) > > where I'd rather like to get an error code back to my routines. > > Is there any way to change this? > > -- > > Sure ... install a signal handler: But then I'd have to do all error handling myself. What I want is the documented error reporting behaviour of the math library, i.e. an error code in the global variable errno, because some routines in my code rely on it. In fact, the current behaviour of the machine violates the ANSI standard, according to my knowledge. I suppose someone must have noticed this before! -- ----------------------------------------------------------------------------- -- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ----------------------------------------------------------------------------- -- Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.