From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c696,c887bec98cd793ef X-Google-Attributes: gid10c696,public X-Google-Thread: 111c93,c887bec98cd793ef X-Google-Attributes: gid111c93,public From: conrad@hive.me.gu.edu.au (Conrad Sanderson) Subject: Re: division by zero exceptions ? Date: 1998/11/02 Message-ID: #1/1 X-Deja-AN: 407458051 References: <01be0482$6ebd1e60$45934b0c@default> <71f8bc$clh$3@newnews.nl.uu.net> Organization: Griffith University, Brisbane, Australia Newsgroups: comp.os.linux.alpha,comp.os.linux.development.apps Bill Metzenthen wrote: >>You state that >>>For most computations 1/0 represents a severe error >>but I would beg to differ. For trig and algebra, 1/0 is a linear >>infinity, and (like with eg superstrings) you don't give a damn about >>infinity provided at the end they all cancel out and give you your >>answer. Which for trig and algebra you know they will. > >Then we will have to agree to disagree. I will assert that 1/0 is >most likely to occur due to an oversight on the part of the >programmer. Sometimes you can get away with letting 1/0 = infinity, I'd prefer to have my algorithm blow up with Infinity or NaN and _handle_ that within my program. I write algorithms which are not guaranteed to be stable, but are stable for 99% of the data i feed them. I could go an compile all my code with -mieee but then I get a significant performance penalty. Whether this is because of the quality of the code egcs generates for the Alpha is another question. Currently it is more viable for me to use a Pentium II/450 than an Alpha 600 because my code runs faster on the Pentium. -- Conrad Sanderson - Microelectronic Signal Processing Laboratory Griffith University, Queensland, Australia http://spl.me.gu.edu.au [ under construction ]