help-octave
[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: Mike Miller
Subject: Re: less than or equal to formula for complex numbers
Date: Tue, 17 Dec 2013 12:54:46 -0500

On Tue, Dec 17, 2013 at 18:45:29 +0100, Bård Skaflestad wrote:
> On Tue, 2013-12-17 at 18:18 +0100, Lukas Reichlin wrote:
>> Dear Octave Community
>>
>> The Octave manual defines for complex numbers the following ordering: z1 < 
>> z2 [...]
>> Now I'm looking for the formula for z1 <= z2:
>
> Isn't this "simply" !(z2 < z1)?

Yes, which can also be expanded to the equivalent

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

Note this is not the same as

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

It should also be equivalent to eq (z1, z2) || lt (z1, z2), but in
fewer operations.

-- 
mike


reply via email to

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