(in)exactness of complex numbers

David C. Ullrich ullrich at math.okstate.edu
Thu Aug 2 09:51:55 EDT 2001


On Thu, 02 Aug 2001 09:28:05 +0200 (MET DST), Mikael Olofsson
<mikael at isy.liu.se> wrote:

>
>On 01-Aug-2001 David C. Ullrich wrote:
> >  (Not that it makes any difference here, but
> >  since you undertstand the math so much better
> >  than I do: Exactly what definition of
> >  "complex number" do you have in mind here?
> >  The _standard_ definition _is_ "pair of
> >  real numbers".)
>
>I'd say it's not the standard definition, but rather the standard
>representation.

Well, it _is_ the _definition_ in many contexts. Honest.

(_Not_ that I see what it _matters_ what "the" definition
in mathematics is! The idea that that should be an
important criterion in determining the way Python
complexes should work seems silly.)

> The complex field C is an extension of degree 2 of the 
>reals R (by the way, the only possible extension of R). To get a 
>representation of the complex field you need a root of an irreducible
>polynomial over R. The standard representation uses the polynomial 
>x**2 + 1, and we usually call that root i or j. This means that we have
>i**2 = -1. This choice is natural, since it gives the easiest rules for
>arithmetic operations. However, you could use any other irreducible 
>polynomial over R, e.g. x**2 + x + 1. You still would use a pair of 
>reals to represent a complex number, but another pair than you would
>have in the standard representation. And the arithmetic rules would
>be different as well.

Something like that could be very interesting, but surely the
sort of thing that could not possibly belong in Python proper
instead of some specialized module.

>What I believe Greg is aiming at is that the complex numbers are more
>than a pair of reals. A pair of reals is not a complex number unless
>you specify the arithmetic rules of the pair.

It's certainly true that a pair of reals is not exactly the same
thing as a complex for exactly the reason you give. I don't see
what bearing that has on how a Python complex should work (and
hence it doesn't seem to me to be what he was getting at, since
he was drawing conclusions about what Python complexes should
be from statements about what the mathematical definition is.)

>Now *I* would not mind to allow complex numbers with integers as 
>coefficients. That way I would get Gaussian integers without specifying
>my own class for the purpose. _But_, I understand that very few would
>have a need for that.

Right. For possibly the seventh time: I was not making a request.
Just pointing out that when someone says that the fact that
floats should always be inexact _implies_ that complexes
should always be inexact someone seemed to be misunderstanding
someone else's point, which point appeared to me to be
a request for exact or inexact complexes which was perfectly
consistent with the idea that floats should always be inexact.

> I mean, how many acually uses complex numbers
>at all in their programs. Most people still regard complex numbers as
>a very obscure corner in math. About only a 150 years ago, when complex
>numbers were new,

??? Not that it matters, but I woulda thought they'd been around a
little longer than that.

> many _mathematicians_ thought of them as something 
>the devil had produced.
>
>/Mikael
>
>-----------------------------------------------------------------------
>E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
>WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael               
>Phone:   +46 - (0)13 - 28 1343
>Telefax: +46 - (0)13 - 28 1339
>Date:    02-Aug-2001
>Time:    08:48:18
>
>         /"\
>         \ /     ASCII Ribbon Campaign
>          X      Against HTML Mail
>         / \
>
>This message was sent by XF-Mail.
>-----------------------------------------------------------------------
>



David C. Ullrich



More information about the Python-list mailing list