On Sun Sep 9 21:15 , Søren Hauberg sent:
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.
The starting point was sumskipnan. If NaN+1=NaN by defintion, that function is
useless.
What do you mean/refer to when you say that NaN+1 is "well defined"?