(in)exactness of complex numbers

Markus Schaber markus at schabi.de
Thu Aug 2 11:57:33 EDT 2001


Hi,

Mikael Olofsson <mikael at isy.liu.se> schrub:

> 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.

Thats right, especially when you imagine that one can also express 
complex numbers in polar coordinates, which very much simplifies 
multiplication and exponential operations, but makes it horribly to 
just add two numbers together (as long as they don't have the same 
"angle").

I personally think that the internal representation can perfectly be 
transparent to the programmer (==user) of the numbers, and there would 
be methods (or attributes) for the angle, absolute value, x and y 
coordinates. Of course, one can give the possibility to choose the 
implementation that gives best speed for the mostly used cases.

markus
-- 
Defend democrathy and freedom!



More information about the Python-list mailing list