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 #1918] Wed, 06 April 1994 08:37 Go to previous message
isaacman is currently offline  isaacman
Messages: 20
Registered: June 1992
Junior Member
In article <thompson.765642193@serts.gsfc.nasa.gov>, thompson@serts.gsfc.nasa.gov (William Thompson) writes...
> I think the problem is that such problems are degenerate--there is more than
> one correct answer. For example, if we define A and B to be
>
> IDL> A = COMPLEX(1,1)
> IDL> B = COMPLEX(-1,-1)
>
> and C to be
>
> and B to be
>
> IDL> C = A^2
> IDL> PRINT, C
> ( 0.00000, 2.00000)
>
> then A can be thought of as the square root of C. However, so can B, because
> A^2 and B^2 resolve to the same value. Thus, which is the correct answer for
> C^(0.5)?
>
> Evidently, IDL gets around this ambiguity by not allowing one to calculate a
> complex number to a non-integer power, even if the floating point number could
> be simplified to an integer such as in your example above.

I don't agree with this at all. IDL has no problem taking the square
root of positive real numbers, even though (-2.)^2 = (2.)^2

Rich Isaacman
[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: Wed Oct 08 19:49:26 PDT 2025

Total time taken to generate the page: 0.00661 seconds