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

Home » Public Forums » archive » Re: QROMB crashes IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: QROMB crashes IDL [message #13623] Mon, 23 November 1998 00:00
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <365862CE.E87869EF@io.harvard.edu> Martin Schultz
<mgs@io.harvard.edu> writes:

> Kjetil Kjernsmo wrote:
>
>> Dear all!
>>
>> I have an integral that I want to check if it converges or diverges,
>> and of course, if it converges, I want the value. They say it must be
>> evaluated numerically, so I figured I would try to solve it in IDL,
>> and see what happens.
>>
>> Unfortunately, it seems that when the integral diverges, IDL crashes
>> with the following message:
>>
>> % Program caused arithmetic error: Floating illegal operand
>> Floating exception
>>
>> [... rest snipped]

[...]

> I wouldn't call this a crash. Th eerror message that you get
> is simply the warning of IDL that it did encounter what you asked
> for : a NaN or Inf value! Check out the online help section on
> "math errors" to learn how to control them.

The problem is that the idl session aborts. That is, on an
{ alpha OSF unix 5.1.1 Jul 20 1998}, IDL crashes (as in
going back to the shell prompt) if the function to be
integrated returns a NaNQ... Does this happen on most
platforms? Although it could be debated whether this is a
bug (I wouldn't expect *sensible* results from a
nonsensical intregral :-), it's certainly not what you'd
expect from IDL.

Bearing in mind that the qromb is a Num. Recipes routine,
though, I wouldn't expect RSI to "fix" it...

Regards,

Stein Vidar
Re: QROMB crashes IDL [message #13627 is a reply to message #13623] Sun, 22 November 1998 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Kjetil Kjernsmo wrote:

> Dear all!
>
> I have an integral that I want to check if it converges or diverges,
> and of course, if it converges, I want the value. They say it must be
> evaluated numerically, so I figured I would try to solve it in IDL,
> and see what happens.
>
> Unfortunately, it seems that when the integral diverges, IDL crashes
> with the following message:
>
> % Program caused arithmetic error: Floating illegal operand
> Floating exception
>
> [... rest snipped]

> Kjetil

> --
> Kjetil Kjernsmo
> Graduate astronomy-student Problems worthy of attack
> University of Oslo, Norway Prove their worth by hitting back
> E-mail: kjetikj@astro.uio.no - Piet Hein
> Homepage <URL:http://www.astro.uio.no/~kjetikj/>
> Webmaster@skepsis.no

I wouldn't call this a crash. Th eerror message that you get is simply the warning of
IDL that it did encounter what you asked for : a NaN or Inf value! Check out the
online help section on "math errors" to learn how to control them. The other idea is
to test the validity of the expression with the finite() function before actually
evaluating it. ... and then there is always the good old way of looking at the
expression and testing for if (x ne 0.) then z=1/x etc. ;-)

Regards,
Martin.

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Some expert input required
Next Topic: Saving problems

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

Current Time: Thu Oct 09 21:18:48 PDT 2025

Total time taken to generate the page: 0.08196 seconds