bugGNU Octave - Bugs: bug #53458, bitor: neither producing...

 
 

bug #53458: bitor: neither producing error,warning nor correct result unlike MATLAB

Submitter:  Dildar Sk <hodor123456>
Submitted:  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 Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sun 25 Mar 2018 06:48:34 AM UTC, comment #1: 

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.

Dildar Sk <hodor123456>
Sun 25 Mar 2018 06:46:21 AM UTC, original submission:  

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,

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

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

+verbatim+
 -- bitor (X, Y)
     Return the bitwise OR of non-negative integers X and Y.
...
-verbatim-

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

Dildar Sk <hodor123456>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hodor123456 (Submitted the item)
  • -email is unavailable- added by hodor123456
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-25 hodor123456 Carbon-Copy- Added -email is unavailable-

    Back to the top


    Powered by Savane 3.9