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

Home » Public Forums » archive » Re: complex arithmetic
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: complex arithmetic [message #1921 is a reply to message #1920] Wed, 06 April 1994 06:23 Go to previous messageGo to previous message
jjp is currently offline  jjp
Messages: 2
Registered: February 1994
Junior Member
In article <2ntm1pINN1ko@i32.sma.ch>, stl@sma.ch (Stephen Strebel) writes:
|> In article <1994Apr5.123735.8305@news.uit.no> royd@zapffe.mat-stat.uit.no (Roy Einar Dragseth) writes:
|> >Why isn't this supported:
|> >IDL> x = complex(0.,1.)
|> >IDL> print, x^(1./3.)
|> >% Operation illegal with complex type.
|> >% Execution halted at $MAIN$ .
|> >
[snip]

This works:

function cpower, z, p
; raise a complex number z to a power p
return,exp(p*alog(z))
end

Hope this helps.

__

Jim Pekar jp2d@nih.gov Disclaimer: Speaking only for myself.
"A good public library has something to offend everyone."
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Map Projections ( PLATE CARREE )
Next Topic: JPEG routines for IDL

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

Current Time: Fri Oct 10 05:15:46 PDT 2025

Total time taken to generate the page: 0.40085 seconds