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 #4304 is a reply to message #4289] Tue, 23 May 1995 00:00 Go to previous messageGo to previous message
asb is currently offline  asb
Messages: 13
Registered: May 1994
Junior Member
In article <heard.1151115158F@131.136.96.1> heard@drep.dnd.ca (Garry J. Heard) writes:

Newsgroups: comp.lang.idl-pvwave
Path: nih-csl!darwin.sura.net!mojo.eng.umd.edu!bloom-beacon.mit.ed u!panix!news.mathworks.com!news.kei.com!ub!netfs.dnd.ca!drep .dnd.ca!131!heard
From: heard@drep.dnd.ca (Garry J. Heard)
Sender: nobody@drep.dnd.ca
Organization: Esquimalt Defence Research Detachment
Date: Wed, 17 May 1995 16:18:38 GMT
X-Newsreader: VersaTerm Link v1.1.3
Lines: 33

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.

The error appears to occur only when complex numbers and real numbers
are used with certain functions. The command

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

gives the correct result.
[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 14:39:14 PDT 2025

Total time taken to generate the page: 2.40011 seconds