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

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

[Octave-bug-tracker] [bug #53011] Documentation of sort and comparison o


From: Michael Leitner
Subject: [Octave-bug-tracker] [bug #53011] Documentation of sort and comparison operators
Date: Tue, 30 Jan 2018 05:22:09 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?53011>

                 Summary: Documentation of sort and comparison operators
                 Project: GNU Octave
            Submitted by: mleitner
            Submitted on: Tue 30 Jan 2018 10:22:07 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Documentation
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Any

    _______________________________________________________

Details:

I am splitting up bug #52919. First the smallest issue, that I called a buglet
there:

According to the documentation of sort: Sorting of complex entries is done
first by magnitude ('abs (Z)') and for any ties by phase angle ('angle (z)').
However, consider the following code:


a=complex([-5; 0; 5;0;-5],[+0;5; 0;-5;-0])
abs(a)==5
angle(a)
angle(sort(a))


That is, all entries have the same length and thus should be sorted according
to angle. But they are not due to inconsistent treating of +0i and -0i on the
negative axis. This is due to the comparison on complex values:


a<=5


As Rik noted in comment 14 of #52919, if in the comparison an angle of -pi
appears, it is mapped to +pi. So this is a documentation bug for sort and the
comparison operators, of course only of low priority.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53011>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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