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: Nils Faerber Subject: Re: division by zero exceptions ? Date: 1998/10/28 Message-ID: <363793e6.0@rainbow.hrz.uni-siegen.de>#1/1 X-Deja-AN: 406076816 Sender: Nils Faerber References: Newsgroups: comp.os.linux.alpha,comp.os.linux.development.apps In comp.os.linux.alpha Remco Wouts wrote: : conrad@hive.me.gu.edu.au (Conrad Sanderson) writes: : > running this C++ program on an Alpha: : > : > void main() { : > float a = 10.0; float b = 0.0; : > float c = a/b; : > cout << "c = " << c << endl; : > } : > causes "Floating exception Exit 136", while on Intel PII is says: : > "c = Inf", which is the "correct" answer. : First of all, this is not the correct answer. Dividing by zero is : nonsense. So actually the Alpha is right. What you mean, but what is Nope, sorry. For IEEE floating point, inf is the correct answer. Mayber you should recompile your code with -mieee ? CU nils -- Nils Faerber (Linux Nils) eMail: nils@unix-ag.org Student of computer science http://www.si.unix-ag.org/~nils/ Unix user group, University of Siegen, Germany Siegen ... the arctic rain forest! --