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

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

[Octave-bug-tracker] [bug #53460] bitxor: neither producing error, warni


From: Dildar Sk
Subject: [Octave-bug-tracker] [bug #53460] bitxor: neither producing error, warning nor correct result unlike MATLAB
Date: Sun, 25 Mar 2018 08:13:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

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

                 Summary: bitxor: neither producing error,warning nor correct
result unlike MATLAB
                 Project: GNU Octave
            Submitted by: hodor123456
            Submitted on: Sun 25 Mar 2018 12:13:40 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Missed Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Dildar Sk
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

This is almost like bug #53458
in MATLAB,


>> bitxor(-10,20)
Error using bitxor
Double inputs must have integer values in the range of ASSUMEDTYPE.
 
>> bitxor(-10,-20)
Error using bitxor
Double inputs must have integer values in the range of ASSUMEDTYPE.


In Octave,


>> bitxor(-10,20)
ans =  20
>> bitxor(-10,-20)
ans = 0


So, it's not producing error, warning for negative inputs neither the result
is correct. 
Most importantly,help bitxor says,


-- bitxor (X, Y)
     Return the bitwise XOR of non-negative integers X and Y.


So, according to the help it should throw error for negative inputs.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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