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

Home » Public Forums » archive » Floating point error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Floating point error [message #34747] Fri, 11 April 2003 14:19
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
I am trying to scatter a vector "data" into an array "array" using array
subscripts. "data" contains some NaNs.

This causes floating point exceptions, even though no "operation" is
taking place.

IDL> help, i, j, h, data, array
I LONG = Array[176779]
J LONG = Array[176779]
H LONG = Array[176779]
DATA FLOAT = Array[176779]
ARRAY FLOAT = Array[720, 160, 24]
IDL> array[i,j,h] = data
% Program caused arithmetic error: Floating illegal operand
IDL> q = data ;Copy data
IDL> q[*] = 0.0 ;Get rid of NaNs
IDL> array[i,j,h] = q ;No problem

If this is a feature, it is going to make using NaNs very difficult.

Ken
[Message index]
 
Read Message
Previous Topic: Whither Object
Next Topic: Re: ENVI band math: "b1 gt b2 " , "(b1-b2) gt 0" same or not?

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

Current Time: Wed Oct 08 13:10:43 PDT 2025

Total time taken to generate the page: 0.00171 seconds