Obsolesence of <>
Nick Perkins
nperkins7 at home.com
Sun Jun 3 02:52:52 EDT 2001
In defense of Jose, i think he was trying to provide
a 'total order relation' on the complex numbers,
whereas the 'simple' method is a 'partial order relation'.
The difference would be that in a total order relation,
no two different complexes would map to the same real,
so no two different complexes would compare as 'equal'.
I am not sure is Jose succeeds, or if that is even possible.
I seem to remember that it is possible,...i think...
Personally, i would compare complex numbers by their
distance to the origin ( in the 2D complex plane ).
This could be optimized by directly comparing the
sum of sqaures of the real and imag parts, without
bothering to do the sqrt to find the actual distance
to the origin.
It would make it easier to program a Mandelbrot fractal!
"Jose' Sebrosa" <sebrosa at artenumerica.com> wrote in message
news:3B182360.1C6362FB at artenumerica.com...
> Darren New wrote:
> >
> > Jose' Sebrosa wrote:
> >
> > > Thats the only way I can figure to invent a comparison between two
complexes,
> > > and it seems preety absurd to me...
> >
> > If you're looking for a consistant but nonsense way of comparing tuples,
> > you could compare them as tuples of floats. A < B if A.real < B.real ||
> > (A.real == B.real && A.imag < B.imag).
>
> Gosh! So simple! Of course you are right!
>
More information about the Python-list
mailing list