octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: less than or equal to formula for complex numbers


From: Alasdair McAndrew
Subject: Re: less than or equal to formula for complex numbers
Date: Wed, 18 Dec 2013 13:31:11 +1100

The octave definition is pretty arbitrary.  You may like to consider which of the following properties it satisfies:

!x<x
x<y & y<z -> x<z
For any x,y then one of the following must hold: x<y, y<x, x=y
If x<y then x+a<y+a for all a
If x<y and a>0 then xa<ya.

In fact, it can be proved that there is no possible ordering on the complex numbers which satisfies all of these (that is, makes the complex numbers an ordered field).  So you can pick any ordering you like, and decide which of the above ordering properties you're prepared to live without.  One standard ordering is lexicographic, which can easily be adapted to quaternions:

a+bi+cj+dk<A+Bi+Cj+Dk iff a<A or, a=A and b<B, or a=A,b=B and c<C, or a=A,b=B,c=C,d<D.

(This won't satisfy the last property above).

cheers,
Alasdair


On Wed, Dec 18, 2013 at 4:18 AM, Lukas Reichlin <address@hidden> wrote:
Dear Octave Community

The Octave manual defines for complex numbers the following ordering: z1 < z2 if and only if

        abs(z1) < abs(z2) || (abs(z1) == abs(z2) && arg(z1) < arg(z2))

Now I'm looking for the formula for z1 <= z2:

Could it be

        abs(z1) <= abs(z2) || (abs(z1) == abs(z2) && arg(z1) <= arg(z2))
or
        lt (z1, z2) || eq (z1, z2)

or something completely different?

The reason why I'm asking is that I want to implement something similar for quaternions.

Thanks for any hints!
Lukas
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave



--
Blog: http://amca01.wordpress.com
Web:  http://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew

reply via email to

[Prev in Thread] Current Thread [Next in Thread]