AA with complex keytype?

Manfred Nowak svv1999 at hotmail.com
Wed Feb 14 07:52:42 PST 2007


Nicolai Waniek wrote

> What's about this:
> 
> a = 1+0j
> b = 0+1j
> 
> how would you increment a to finnally get to b? how do you want to
> compare two complex numbers? this is mathematically impossible.

It depends on how one defines "increment".
Because Charles only mentions one operation, "increment" can be defined 
to be the normal complex multiplication.

Then "increment( a, b)= b" holds in your case above.

If one wants to define an ordering for all points on the unit-circle 
around the origin Charles is also righteous to define:

  (a != b) => (a < b) & (b < a)

Because you can travel on the circumference of the circle in each 
direction until "a != b" turns out to be false.

-manfred  
  



More information about the Digitalmars-d mailing list