bugGNU Octave - Bugs: bug #53460, bitxor: neither producing...

 
 

bug #53460: bitxor: neither producing error,warning nor correct result unlike MATLAB

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

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Sun 25 Mar 2018 12:13:40 PM UTC, original submission:  

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.

Dildar Sk <hodor123456>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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 group members can vote.

     

    History

    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.16-ed84.
    Corresponding source code