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

Home » Public Forums » archive » Re: Turning off math error checking for a code block
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: Turning off math error checking for a code block [message #28888 is a reply to message #28883] Thu, 17 January 2002 12:54 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Vapuser wrote:
>
> k-bowman@null.com (Kenneth Bowman) writes:
>
>> I have an array x that is likely to have missing values in it, indicated by NaN's. I would like to search the array for values less than x_min. Because of the NaN's, WHERE generates a floating point error, e.g.,
>>
>> IDL> print, x
>> 0.00000 NaN 2.00000 3.00000
>> IDL> print, where(x lt 2.0)
>> 0
>> % Program caused arithmetic error: Floating illegal operand
>>
>
> Hmmmm..... I don't get this result.

Sure you do - you just have a 0 instead of a 3 as the 4th element of y:

> IDL> y=[0,!values.f_nan,2,0.]

The where result of the original is one index - the 0th one:

IDL> x=[0,!values.f_nan,2,3.]
IDL> print,where( x LT 2,nx),nx
0
1
% Program caused arithmetic error: Floating illegal operand

paulv

p.s. After trying the simple example above, it sure is annoying to get that error message. :o\

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: load sharing on multiple machines?
Next Topic: Turning off math error checking for a code block

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

Current Time: Wed Oct 08 18:38:46 PDT 2025

Total time taken to generate the page: 0.00465 seconds