>>>>> bukzor <[EMAIL PROTECTED]> (B) wrote:

>B> Why cant you implement < for complex numbers? Maybe I'm being naive,
>B> but isn't this the normal definition?
>B>     a + bi < c + di iff sqrt(a**2 + b**2) < sqrt(c**2, d**2)

There doesn't exist a `normal' definition of < for the complex numbers. For
example you would expect that x<y and z<u would imply that x+z<y+u and
similar thing for other operators. This is impossible for complex numbers.
Now if you use it only for set building then you could relax the
constraints and use for example the lexicographical order.
-- 
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to