help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isnumeric (NaN) = true !?


From: Francesco Potortì
Subject: Re: isnumeric (NaN) = true !?
Date: Thu, 25 Mar 2010 17:52:52 +0100

>> What is the logic behind this:
>> 
>>      isnumeric (NaN) = 1
>> 
>> I believe that "NaN" means "not a number". How can something which is
>> "not a number" be numeric? What is the logic behind this?

"numeric" is what are numbers as far as computers are concerned.  That
is, those entities to which you apply numeric operators (addition,
multiplication and so on).  Numeric expressions are composed of numbers
and numeric operators and are evaluated to a number.

Numbers are generally stored and manipulated in IEEE representation,
which includes a given range of real numbers and some additional
entities, among which NaN, +Inf and -Inf.  For an introducion, see
 <http://en.wikipedia.org/wiki/IEEE_754-2008>.

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]