comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: odd behaviour from array_equal() with NaN, Inf values
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: odd behaviour from array_equal() with NaN, Inf values [message #79037 is a reply to message #79030] Mon, 23 January 2012 04:37 Go to previous messageGo to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
On 23/01/12 06:46, Craig Markwardt wrote:
> It is a property of NAN that it can never equal itself so - perhaps
> surprisingly -
> (A[1] EQ A[1]) is false. Try it yourself!

I think this is a case where adherence to the IEEE standard is not
necessarily what the user wants. There should be a version of
ARRAY_EQUAL where NaN==NaN, for cases where one wants to know if two
arrays contain the same data; similar to MEAN(), which gives the
opportunity to ignore NaNs, and, with it, to shoot oneself in the foot.


chl
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Cramér–von Mises criterion
Next Topic: to read excel file in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:50:33 PDT 2025

Total time taken to generate the page: 1.99809 seconds