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

Home » Public Forums » archive » Arithmetic error from NR_MACHAR()
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: Arithmetic error [message #29097 is a reply to message #12177] Thu, 31 January 2002 10:41 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Ed Wright wrote:
>
> in article a3b58p$kb2i$1@rook.le.ac.uk, Nigel Wade at nmw@ion.le.ac.uk wrote
> on 1/31/02 2:11 AM:
>
>> Ed Wright wrote:
>>
>>>
>>> To: IDL
>>> From: Ed Wright, JPL
>>>
>>> I require assistance with an odd problem. My current projects involves
>>> creating a dlm module of some 200+ routines from a library of 1500+
>>> routines. Several of the IDL callable routines replicate intrinsic IDL
>>> calls. While testing one such routine that calculates determinate of a 3X3
>>> I encountered a problem. The numerical result between my determinant
>>> function and determn matches to 10^(-16).
>>>
>>> Now the odd thing. Under certain circumstances the use of my determinant
>>> function as an argument in another routine call causes an error:
>>>
>>> % Program caused arithmetic error: Floating illegal operand.
>>>
>>
>> That error means somewhere in your code you have generated a NaN (Not a
>> Number). The operations which generate NaNs include 0/0, Inf*0, sqrt(<0)
>> Inf-Inf,Inf/Inf (there may be others...).
>
> By code, should I take it to mean the external C code?
>
>>
>> Since you don't have a preceding 'Floating divide by zero', it's a fair bet
>> your error doesn't involve Inf. So, all you have to do is look through your
>> code to find where you might have a 0/0 or sqrt(<0). ;-)
>
> Oh, is that all. No problem. 300k lines - let me at them.... Mr. Codebuster,
> that's me.

Try !EXCEPT=2 and let IDL do the searching for you. Be prepared for a lot of output.....

paulv

--
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
Previous Topic: Object graphics under Linux: are they supposed to be that slow?
Next Topic: Re: All I get is gray scale

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

Current Time: Fri Oct 10 03:56:03 PDT 2025

Total time taken to generate the page: 5.51895 seconds