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 #28966 is a reply to message #28876] Fri, 18 January 2002 09:22 Go to previous message
Martin Downing is currently offline  Martin Downing
Messages: 136
Registered: September 1998
Senior Member
craig wrote:
> I have found that an operation on an array which contains NANs is
> slowed down considerably. I think it is because each operation causes
> a floating point exception which is handled in the OS. I use WHERE
> most of the time when this comes up. Occassionally I get "floating
> exception" messages, but big whoop.


To illustrate craigs point:

IDL> a = replicate(!values.f_nan,1024,1024)

IDL> b = replicate(2.0,1024,1024)

IDL> help, a,b

A FLOAT = Array[1024, 1024]

B FLOAT = Array[1024, 1024]

IDL> t = systime(1) & for i =0,9 do c = total(a * 2) & print, systime(1) - t

3.1250000

IDL> t = systime(1) & for i =0,9 do c = total(a * 2) & print, systime(1) - t

3.1240001

IDL> a = replicate(2.0,1024,1024)

IDL> help, a

A FLOAT = Array[1024, 1024]

IDL> t = systime(1) & for i =0,9 do c = total(a * 2) & print, systime(1) - t

0.71099997
[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:44:21 PDT 2025

Total time taken to generate the page: 0.00406 seconds