Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | jt@toerring.de (Jens Thoms Toerring) |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: How the computer identify an NaN? |
| Date | 2011-08-16 11:31 +0000 |
| Organization | Freie Universitaet Berlin |
| Message-ID | <9av2ojF9heU4@mid.uni-berlin.de> (permalink) |
| References | (2 earlier) <9d47f418-5533-414f-b9da-15385ce9c442@c19g2000yqe.googlegroups.com> <j2d41i$krg$1@news.m-online.net> <0e6e63f1-e63e-4e52-9db5-ec1807044878@glegroupsg2000goo.googlegroups.com> <j2ditd$t3d$1@news.m-online.net> <9av2j8F9heU3@mid.uni-berlin.de> |
Jens Thoms Toerring <jt@toerring.de> wrote:
> Heinrich Wolf <invalid@invalid.invalid> wrote:
> > "bert" <bert.hutchings@btinternet.com> schrieb im Newsbeitrag
> > news:0e6e63f1-e63e-4e52-9db5-ec1807044878@glegroupsg2000goo.googlegroups.com...
> > ...
> > >> ex:
> > >> b_u = 3;
> > >> (b_u!=b_u) ==> 1, right?
> > >>
> > >> Have you tried?
> > >> I doubt that.
> > >>
> > > You should listen more carefully when
> > > people who have a complete understanding
> > > of some topic try to explain it to you.
> > >
> > > Where 'b' is a real, (b != b) is 1 or 0,
> > > depending strictly on whether the current
> > > value of 'b' is a NaN, or is not a NaN.
> > > --
> > pardon?
> > I noticed that b_u is a real which results in 3.0 by assignment;
> > Why should (3.0 != 3.0) result in 1?
> You snipped the most relevant part of your own post, i.e.
> >>> If NaN won't equal to anything, any number will not equal to itself
> >>> either. I still do not understand b_u != b_u;
> and the statement made by "bert" was that
> b != b
> evaluates to 1 if b is not-NaN (e.g. for b set to 3) but to 0
> if b is NaN (always assuming that IEEE floating point represen-
> tation is used).
Sorry, got that just the wrong way round
For b = 3 b != b results in 0
For b = NaN b != b results in 1
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How the computer identify an NaN? fl <rxjwg98@gmail.com> - 2011-08-15 20:19 -0700
Re: How the computer identify an NaN? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-16 04:33 +0100
Re: How the computer identify an NaN? fl <rxjwg98@gmail.com> - 2011-08-15 21:45 -0700
Re: How the computer identify an NaN? Robert Wessel <robertwessel2@yahoo.com> - 2011-08-16 00:45 -0500
Re: How the computer identify an NaN? "Heinrich Wolf" <invalid@invalid.invalid> - 2011-08-16 08:51 +0200
Re: How the computer identify an NaN? bert <bert.hutchings@btinternet.com> - 2011-08-16 02:01 -0700
Re: How the computer identify an NaN? "Heinrich Wolf" <invalid@invalid.invalid> - 2011-08-16 13:04 +0200
Re: How the computer identify an NaN? jt@toerring.de (Jens Thoms Toerring) - 2011-08-16 11:28 +0000
Re: How the computer identify an NaN? jt@toerring.de (Jens Thoms Toerring) - 2011-08-16 11:31 +0000
Re: How the computer identify an NaN? "Heinrich Wolf" <invalid@invalid.invalid> - 2011-08-16 14:08 +0200
Re: How the computer identify an NaN? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-16 13:37 +0100
Re: How the computer identify an NaN? jt@toerring.de (Jens Thoms Toerring) - 2011-08-16 21:13 +0000
Re: How the computer identify an NaN? "Heinrich Wolf" <invalid@invalid.invalid> - 2011-08-16 14:17 +0200
Re: How the computer identify an NaN? "Heinrich Wolf" <invalid@invalid.invalid> - 2011-08-16 13:22 +0200
Re: How the computer identify an NaN? Angel <angel+news@spamcop.net> - 2011-08-16 15:17 +0000
Re: How the computer identify an NaN? James Kuyper <jameskuyper@verizon.net> - 2011-08-16 08:42 -0400
Re: How the computer identify an NaN? Stephen Sprunk <stephen@sprunk.org> - 2011-08-16 09:25 -0500
Re: How the computer identify an NaN? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-08-16 12:37 -0600
Re: How the computer identify an NaN? Keith Thompson <kst-u@mib.org> - 2011-08-16 12:26 -0700
csiph-web