From: Joe Mario <mario@zk3.dec.com>
Subject: Re: Why does this code dont work on Alpha?
Date: 2000/01/05 [thread overview]
Message-ID: <3873823B.D7C06D6F@zk3.dec.com> (raw)
In-Reply-To: 84vbos$v43$1@inet-1.pnu.com
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.
prev parent reply other threads:[~2000-01-05 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-05 5:00 Why does this code dont work on Alpha? Pete
2000-01-05 5:00 ` Andreas Krall
2000-01-05 5:00 ` Phillip Helbig
2000-01-05 5:00 ` Joe Mario [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox