Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: NaN's origin

Reply
Thread Tools

Re: NaN's origin

 
 
Frank Schmitt
Guest
Posts: n/a
 
      07-07-2003
"Victor Bazarov" <(E-Mail Removed)> writes:

> "klaas" <(E-Mail Removed)> wrote...
> > How does a NaN occur?

>
> 0 * infinity, 0/0, infinity + / - infinity.


This makes me wonder - shouldn't infinity + infinity just
return infinity?

regards
frank

--
Frank Schmitt
4SC AG phone: +49 89 700763-0
e-mail: frank DOT schmitt AT 4sc DOT com
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-07-2003
"Frank Schmitt" <(E-Mail Removed)> wrote...
> "Victor Bazarov" <(E-Mail Removed)> writes:
>
> > "klaas" <(E-Mail Removed)> wrote...
> > > How does a NaN occur?

> >
> > 0 * infinity, 0/0, infinity + / - infinity.

>
> This makes me wonder - shouldn't infinity + infinity just
> return infinity?


You're right. Different sources tell different stories.
I wasn't using any IEEE-certified document, just some web
site. Another site claims the same except inf + inf. That
does allegedly result in infinity.

Victor


 
Reply With Quote
 
 
 
 
Pete Becker
Guest
Posts: n/a
 
      07-08-2003
Victor Bazarov wrote:
>
> "Frank Schmitt" <(E-Mail Removed)> wrote...
> > "Victor Bazarov" <(E-Mail Removed)> writes:
> >
> > > "klaas" <(E-Mail Removed)> wrote...
> > > > How does a NaN occur?
> > >
> > > 0 * infinity, 0/0, infinity + / - infinity.

> >
> > This makes me wonder - shouldn't infinity + infinity just
> > return infinity?

>
> You're right. Different sources tell different stories.
> I wasn't using any IEEE-certified document, just some web
> site. Another site claims the same except inf + inf. That
> does allegedly result in infinity.
>


Infinities are usually signed. My recollection is that under IEEE-754,
positive infinity + positive infinity is positive infinity; negative
infinity + negative infinity is negative infinity. When the signs of the
infinities are different the result is NaN.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there anyone of you is origin Vietnamese living in US or Europe or Japanese? Nicol Nghia ASP .Net 0 12-03-2005 02:57 AM
Automatically controlling where a file will be saved based on file extension and/or origin Daniel Prince Firefox 6 12-11-2004 10:58 PM
BGP: Applying map to find origin - help Eli Cisco 1 09-08-2004 11:11 PM
HTML and Applet origin not the same annie Java 1 02-23-2004 01:57 PM
route with EGP origin in BGP table jmarkotic Cisco 5 01-01-2004 09:46 PM



Advertisments