From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,7744da37a4fb6b38 X-Google-Attributes: gid1164f8,public From: andi@complang.tuwien.ac.at (Andreas Krall) Subject: Re: Why does this code dont work on Alpha? Date: 2000/01/05 Message-ID: <84ve9c$dph$1@news.tuwien.ac.at>#1/1 X-Deja-AN: 568614847 References: <84vbos$v43$1@inet-1.pnu.com> Content-Type: text/plain; charset=us-ascii Organization: Vienna University of Technology, Austria Mime-Version: 1.0 Newsgroups: comp.sys.dec In article <84vbos$v43$1@inet-1.pnu.com>, Pete writes: > I wonder why I get > Floating point exception (core dumped) > then I run this very simple C code? > ... > for (i=0;i<1000000000;i++) > x=x*x; ... You get a floating point exception because the result of your computation is to big to be represented as a floating point number (3.14^2^100000000). If you want to do floating point coumputations with infinities you have to compile your program with the option -ieee. Your result will then be a positive infinity. -- andi@complang.tuwien.ac.at Andreas Krall http://www.complang.tuwien.ac.at/andi/ Inst. f. Computersprachen, TU Wien tel: (+431) 58801/18511 Argentinierstr. 8/4/1851 fax: (+431) 58801/18598 A-1040 Wien AUSTRIA EUROPE