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:48:34 -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

Follow-up Comment #1, bug #53458 (project octave):

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.


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]