From -6892430913922416890
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,d93488bb970aa444
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-06-13 07:33:00 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: "Greg Brewer" <nospam.greg@brewer.net>
Newsgroups: comp.std.c++
Subject: Re: How to test for NaNs and infinites?
Date: Wed, 13 Jun 2001 14:32:47 GMT
Organization: Houston Area League of PC Users
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <9g7si3$1n7n$1@news.hal-pc.org>
References: <3B176D2F.70C3E7F7@meteo.fr> <usrihtkqfjd9qfj2bgtbp6pj530asi567k@4ax.com> <b172eb2f.0106071330.5f984936@posting.google.com> <9fql8h$pfg$1@news.hal-pc.org> <3B21100E.5B25F7AA@acm.org> <9frdlp$14bc$1@news.hal-pc.org> <fl3d9ail4o.fsf@sel.cmla.ens-cachan.fr> <9g2em7$1pkk$1@news.hal-pc.org> <fl7kyi5769.fsf@jambon.cmla.ens-cachan.fr>
X-Trace: mail2news.demon.co.uk 992442771 mail2news:21177 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: Wed, 13 Jun 2001 14:15:31 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Lines: 35
Xref: archiver1.google.com comp.std.c++:6053

James Kuyper Jr." <kuyper@wizard.net> wrote in message
news:3B25A13B.4EFB1085@wizard.net...
> The first web site my search engine found describing IEEE formats was:
> <http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html>
> I hope that's acceptable.

I got my info from
http://octarine.itsc.adfa.edu.au:8080/workshopdocs/common/ug/ncg_math.doc.ht
ml

I don't want to get into some complicated argument as to whether or not
infinity (plus or minus) is a number; I don't consider it one.  I consider
infinity 2 special cases of not a number and therefor one is a subset of the
other.  I suppose I could just call the function BadFloat and avoid any
argument; however, I chose to call the IsNAN and I'm not changing it without
a much better reason.  As far as I can tell, the only reason +INF and -INF
are not documented as special cases of NaN is that some people have trouble
with the idea that a floating point bit pattern can be both NaN and INF.
The difference is rarely important.

It's akin to carefully measuring out exactly 2 cups of water to boil
noodles; you can measure it out with a measuring cup making sure that water
level is exactly at the 2 cup mark while I fill my 1 quart pot about half
full -- the end result will taste the same.

Greg



---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



