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

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

[Octave-bug-tracker] [bug #42408] Incorrect results of isequal() with em


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #42408] Incorrect results of isequal() with empty sparse matrices and alphanumerical value comparision.
Date: Fri, 23 May 2014 14:19:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36

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

                 Summary: Incorrect results of isequal() with empty sparse
matrices and alphanumerical value comparision.
                 Project: GNU Octave
            Submitted by: siko1056
            Submitted on: Fri 23 May 2014 04:19:33 PM CEST
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Kai T. Ohlhus
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Hello,

I encountered incorrect results for the equality comparison of empty sparse
matrices, which results in a hard error and the comparison for alphanumerical
values.

In Octave:
octave:2> isequal (sparse([]),[])
error: __isequal__: mx_el_eq: nonconformant arguments (op1 is 0x1, op2 is
0x0)
error: evaluating argument list element number 1
error: called from:
error:   /usr/local/share/octave/4.1.0+/m/general/private/__isequal__.m at
line 161, column 11
error:   /usr/local/share/octave/4.1.0+/m/general/isequal.m at line 31, column
10
octave:2> isequal (83, char(83))
ans = 0
octave:3> isequal (83, 'S')
ans = 0



In MATLAB:


>> isequal (sparse([]),[])
ans = 1
>> isequal (83, char(83))
ans = 1
>> isequal (83, 'S')
ans = 1


I will submit a patch with more test cases shortly.

Regards,
Kai




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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