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

Home » Public Forums » archive » Re: Complex numbers
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: Complex numbers [message #36698] Tue, 14 October 2003 13:01
mmeron is currently offline  mmeron
Messages: 44
Registered: October 2003
Member
In article <162586e3.0310141140.406f5659@posting.google.com>, biomedthesis2002@yahoo.com (New2IDL) writes:
> hi,
> I have a numerical equation
> a = (-0.2)^(-2.2).
>
> IDL gives me an error message "Program caused arithmetic error:
> Floating illegal operand"
>
> But MATLAB gives the output, which is complex number. I am not sure
> how to solve this in IDL. Can anybody help me on this please?
>
IDL needs to be told that you want a complex operation

IDL> print, (-0.2)^(-2.2)
-NaN
IDL> print, (complex(-0.2))^(-2.2)
( 27.9056, -20.2746)

Mati Meron | "When you argue with a fool,
meron@cars.uchicago.edu | chances are he is doing just the same"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Complex numbers
Next Topic: Re: What does an optimal scientific programming language/environment need?

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

Current Time: Sat Nov 29 06:47:01 PST 2025

Total time taken to generate the page: 1.99766 seconds