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

Home » Public Forums » archive » complex math error?
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 math error? [message #4348 is a reply to message #4289] Fri, 19 May 1995 00:00 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
llobet@elpp1.epfl.ch (Xavier Llobet i Sales EPFL-CRPP 1015 Lausanne CH) writes:


> In article <3pgkmo$b3s@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov
> (William Thompson) writes:

> [...]
> =I can't make it fail running IDL 3.6.1c under OSF/1 v2.0 on an AXP 3000/600
> =workstation. I always get the result
> =
> = IDL> print, exp( complex(0,1)*sqrt(2.)*10. )^sqrt(2.)
> = ( -1.28269e-10, 1.66070e-10)
> =
> =no matter how many times I try it. (I assume that's the correct value.)


> Nope. Just try

> IDL> print, exp( complex(0,1)*sqrt(2.)*10. )^sqrt(2.D0)
> ( -0.611276, 0.791417)

> This gives the right value.

> -xavier

Hmmm, when I tried this with IDL 3.6.1c I get

IDL> print, exp( complex(0,1)*sqrt(2.)*10. )^sqrt(2.D0)
( -0.0477381, -0.00519184)

Which is significantly different from either of the above. However, when I
tried this in a beta test version of IDL 4, I get

IDL> print, exp( complex(0,1)*sqrt(2.)*10. )^sqrt(2.D0)
( -0.61127603, 0.79141748)
IDL> print, exp( complex(0,1)*sqrt(2.)*10. )^sqrt(2.)
( -0.611276, 0.791418)

This seems to suggest that there is a bug in IDL v3.6 which is corrected in the
upcoming IDL v4. (Versions of IDL previous to 3.6 wouldn't have allowed the
above expression.)

Bill Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sum to Arrays
Next Topic: Re: Wavelet procedures

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

Current Time: Sat Oct 11 21:26:24 PDT 2025

Total time taken to generate the page: 0.16123 seconds