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

Home » Public Forums » archive » Complex exponentiation problem
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 exponentiation problem [message #6260 is a reply to message #6213] Tue, 28 May 1996 00:00 Go to previous message
asb is currently offline  asb
Messages: 13
Registered: May 1994
Junior Member
It also works correctly if the exponent is a complex array:
IDL> w= EXP( -COMPLEX(0.0,1.0)*(2.0*!pi)/16)
IDL> print,w
( 0.923880, -0.382683)
IDL> p=[1,2,3]
IDL> print,w^p
( 0.923880, -0.382683)( 0.707107, -0.707107)
( 0.382683, -0.923880)
IDL> p=1.0*p
IDL> print,w^p
( 0.857090, -0.00000)( 0.857090, -0.00000)
( 0.857090, -0.00000)IDL> w= EXP( -COMPLEX(0.0,1.0)*(2.0*!pi)/16)
IDL> print,w
( 0.923880, -0.382683)
IDL> p=[1,2,3]
IDL> print,w^p
( 0.923880, -0.382683)( 0.707107, -0.707107)
( 0.382683, -0.923880)
IDL> p=1.0*p
IDL> print,w^p
( 0.857090, -0.00000)( 0.857090, -0.00000)
( 0.857090, -0.00000)
IDL> p=complex(1.,0.)*p
IDL> print,w^p
( 0.923880, -0.382683)( 0.707107, -0.707107)
( 0.382683, -0.923880)

IDL> p=complex(1.,0.)*p
IDL> print,w^p
( 0.923880, -0.382683)( 0.707107, -0.707107)
( 0.382683, -0.923880)

Truly bizarre.

Alan
[Message index]
 
Read Message
Read Message
Previous Topic: Spherical surface spline code?
Next Topic: 3d surfaces and map projections...

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

Current Time: Sun Oct 12 04:34:33 PDT 2025

Total time taken to generate the page: 2.64004 seconds