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 #28894 is a reply to message #28890] Thu, 17 January 2002 11:48 Go to previous messageGo to previous message
k-bowman is currently offline  k-bowman
Messages: 12
Registered: December 2001
Junior Member
In article <3C47094C.1F1879D2@ssec.wisc.edu>, "Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> wrote:

> The FINITE function returns 1 where the argument is finite, and 0 where
> the argument is infinite *or* NaN (see p. 134 of my book). Try the
> following:
>
> x_min = 2.0
> index = where(finite(x) eq 1, count)
> if (count gt 0) then print, where(x[index] lt x_min)

I am aware of that. These are relatively large vectors (10^5 to 10^6 elements), however, and this operation is repeated many times, so I am trying to avoid extracting the finite values (or creating an array index to them). This is my "innermost loop", and efficiency is important. I know there are NaN's. I prefer to simply turn off the error messages.

Perhaps a /NAN keyword on the WHERE function would be useful? (as in, for example, TOTAL)

Ken

P.S. For symmetry, wouldn't it be nice to have an INFINITE function?
[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:51 PDT 2025

Total time taken to generate the page: 0.00440 seconds