help-octave
[Top][All Lists]
Advanced

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

Re: sumskipnan(nan) = 0 ?


From: Søren Hauberg
Subject: Re: sumskipnan(nan) = 0 ?
Date: Sun, 09 Sep 2007 21:15:38 +0200
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

address@hidden skrev:
sum(A) + sum(empty) = sum(A) + nan = sum(A). No?

To me, the only reasonable choice for the sum of nothing is nothing, that is:

sum(nan) = nan.
I think you are misunderstanding the meaning of NaN. "NaN" means "Not a Number", so the addition of "a number" and "not a number" is really well defined. That is NaN+1 can't be a number, and hence must be NaN. Your arguments could to some extend work for "NA" (that is "Not Available"), but even then I wouldn't agree with your logic.

Søren


reply via email to

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