Obsolesence of <>

Jose' Sebrosa sebrosa at artenumerica.com
Fri Jun 1 15:10:43 EDT 2001


Grant Edwards wrote:
> 
> On Fri, 01 Jun 2001 04:10:27 +0100, Jose' Sebrosa <sebrosa at artenumerica.com> wrote:
> 
> >As far as I remember from my first subject on Calculus or so,
> >the set of Complex Numbers has *not* the property of being
> >ordered. So, from the mathematical point of view, it makes no
> >sense to ask questions like "which of two given complex numbers
> >is smaller".
> 
> Right.  It makes equally as little sense to ask which of "foo"
> and 3.98 is smaller, but that's allowed, and returns a
> consistent (and often useful) value.

I would not put these things in the same level of "nosense". To make a
comparison like "smaller" (not like "equal") between two objects, I first need
to put them in a one-dimentional structure. Having several types arranged in a
way that anything from type X is allways bigger than anything from type Y does
exactly that: the types are arranged in a unidimentional structure, then
compared.

The problem with complexes is to arrange them in a unidimentional structure. As
we can map R to C (and vice-versa), it is possible: 

To each X in R corresponds one and only one Z in C, and the Z is built like
this:

First, write X in decimal notation. Lets say it is X = 123.456
Then put the powers of ten alternately in the real and imaginary parts of Z:
the power N in X goes to power N/2 in the real part of Z if N is odd and to the
N/2 in the imaginary part if N is even.

What a confusion! An example makes it obvious:

if X is 123.45678, C will be ( 13.57, 2.468 )

Thats the only way I can figure to invent a comparison between two complexes,
and it seems preety absurd to me...

> In 2.1, strings are larger than floats, in case you're curious.
> 
> It was sometimes useful to know that you could always compare two
> objects.

Yeah, eventually you can save some if's and try's ! :-)

Sebrosa



More information about the Python-list mailing list