Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Problem with complex numbers

Reply
Thread Tools

Re: Problem with complex numbers

 
 
Christian Heimes
Guest
Posts: n/a
 
      03-22-2008
Matthias Götz schrieb:
> So can you tell me what's the purpose of Complex.py,
>
> and where can i find the semantic i'am looking for.


Well, the file is in the Demo folder. It's just a demo how to implement
a naive complex type in Python.

Why do you think the power of a complex to a complex is not defined?
Raising a complex to a complex power is well defined, although the
mathematical proof isn't trivial. You have to use the Euler form. Ask
Google for some examples

Christian

 
Reply With Quote
 
 
 
 
David C. Ullrich
Guest
Posts: n/a
 
      03-23-2008
On Sat, 22 Mar 2008 23:29:10 +0100, Christian Heimes
<> wrote:

>Matthias Götz schrieb:
>> So can you tell me what's the purpose of Complex.py,
>>
>> and where can i find the semantic i'am looking for.

>
>Well, the file is in the Demo folder. It's just a demo how to implement
>a naive complex type in Python.
>
>Why do you think the power of a complex to a complex is not defined?
>Raising a complex to a complex power is well defined,


Really? One of the problems that used to show up on the master's
exams aroung here was to find all the possible values of i**i.

>although the
>mathematical proof isn't trivial. You have to use the Euler form.


Erm, the problem is that the Euler form of a complex number is
not well-defined (_unless_ you specify that the argument is
between -pi and pi). For example, i = exp(i pi/2) and also
i = exp(i 5*pi/2); those two "forms" give different values for i**i.

You might say that a complex power of an Euler form for a
complex number is well-defined.

If you do specify that -pi < argument <= pi, ie you consider
the principal-value logarithm, then you get exactly one z**w.
But that's not always the z**w that you need for your problem...

>Ask
>Google for some examples


Thanks.

>Christian


David C. Ullrich
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How complex is complex? Kottiyath Python 22 03-28-2009 10:11 PM
wsdl2java: method parameter a complex type that extends another complex type Robert Mark Bram Java 0 02-04-2007 10:06 AM
problem with complex numbers vj C++ 12 04-16-2006 11:07 AM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
For expert on complex loops (reposted) - complex looping problem news.amnet.net.au Java 1 04-13-2004 07:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57