Re: QROMB crashes IDL [message #13623] |
Mon, 23 November 1998 00:00 |
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  |
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/
------------------------------------------------------------ -------
|
|
|