octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #62485] sort does not sort


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #62485] sort does not sort
Date: Wed, 18 May 2022 02:32:59 -0400 (EDT)

Update of bug #62485 (project octave):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Complex numbers aren't orderable per definition (see, e.g., [1]). To make it
possible to have a more-or-less consistent result of sorting them anyway,
additional rules must be applied (that will always break some of the rules
that would apply for orderable fields).

The additional rules that Octave has chosen to apply are documented in the
help string for `sort`:
> Sorting of complex entries is done first by magnitude (abs (z)) and for any
ties by phase angle (angle (z)).

That seems to be working as documented in your example.

Closing as invalid.

[1]: https://en.wikipedia.org/wiki/Ordered_field


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62485>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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