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
complex math error? [message #4289] Wed, 17 May 1995 00:00 Go to previous message
heard is currently offline  heard
Messages: 5
Registered: May 1995
Junior Member
Hi,

I think we've found an erratic math error in IDL V3.6 (running on a PPC and
an SGI results were similar). Here it is:


print, exp( complex(0,1)*sqrt(2.)*10. )^sqrt(2.)

Execute the above line a time or two and you'll get the wrong answer, then try
almost any simple math operation on a complex number. i.e.,

print, complex(0,1)^2

Chances are you'll get a wrong answer again. Try the last operation again
and you might then get the correct answer. It's an erratic sort of bug and
seems to have a lot to do with complex numbers and sqrt functions. But it
is unpredictable. The only way we have been able to induce it so far is to
raise a complex exponential to a power involving a sqrt. I guess you should
be wary of any complex math in IDL until RSI has had a look at it. Also, the
bug may not exist in V4. I think that WAVE may not allow these kinds of
operations on complex values, so in a way that will protect you from this
bug (I might be wrong about this since I don't have a current WAVE version
to try it on).

------------------------------------------------------------ -------------------
Garry J. Heard heard@edrd.dnd.ca
Esquimalt Defence Research Detachment
Victoria, B.C., Canada
604/363-2905

Any opinions expressed are my own and not necessarily those of my employer.
------------------------------------------------------------ -------------------
[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: Fri Oct 10 14:54:17 PDT 2025

Total time taken to generate the page: 0.71835 seconds