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

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

[Octave-bug-tracker] [bug #53458] bitor: neither producing error, warnin


From: Dildar Sk
Subject: [Octave-bug-tracker] [bug #53458] bitor: neither producing error, warning nor correct result unlike MATLAB
Date: Sun, 25 Mar 2018 02:46:22 -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/?53458>

                 Summary: bitor: neither producing error,warning nor correct
result unlike MATLAB
                 Project: GNU Octave
            Submitted by: hodor123456
            Submitted on: Sun 25 Mar 2018 06:46:21 AM 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:

In MATLAB,


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

in GNU Octave,


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


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


 -- bitor (X, Y)
     Return the bitwise OR 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/?53458>

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




reply via email to

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