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: Joe Mario Subject: Re: Why does this code dont work on Alpha? Date: 2000/01/05 Message-ID: <3873823B.D7C06D6F@zk3.dec.com>#1/1 X-Deja-AN: 570450317 Content-Transfer-Encoding: 7bit References: <84vbos$v43$1@inet-1.pnu.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: iass@lead.zk3.dec.com X-Trace: lead.zk3.dec.com 947094092 18023 16.141.0.18 (5 Jan 2000 17:41:32 GMT) Organization: UBPG Mime-Version: 1.0 NNTP-Posting-Date: 5 Jan 2000 17:41:32 GMT Newsgroups: comp.sys.dec Pete wrote: > I wonder why I get > Floating point exception (core dumped) > then I run this very simple C code? > > main() > { > float x = 3.14; > long i; > for (i=0;i<1000000000;i++) > x=x*x; > } > The reason it fails is that when "i" reaches 7, the value of "x" is greater than what can be represented in a float type.