bugGNU Octave - Bugs: bug #49168, Wrong results with logical AND

 
 

bug #49168: Wrong results with logical AND

Submitted by:  Simon <simonz>
Submitted on:  Fri 23 Sep 2016 03:55:11 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 23 Sep 2016 04:01:30 PM UTC, comment #1:

See the documentation for and:

The construction

is equivalent to

See the function bitand for what you are trying to do.

With your sample input

Rik <rik5>
Project Administrator
Fri 23 Sep 2016 03:55:11 PM UTC, original submission:

Hi,

When I execute

and(0x05,0x02)

Octave returns 1. I think it should be 0 since the bitwise AND:

0101 & 0010 = 0x0000

Regards,
Simon

Simon <simonz>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38592:  xxx.png added by simonz (49KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by simonz (Submitted the item)
  • -unavailable- added by simonz
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Sep 2016 04:01:30 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Fri 23 Sep 2016 03:55:11 PM UTCsimonzAttached File-=>Added xxx.png, #38592
      Carbon-Copy-=>Added simonz

    Back to the top


    Powered by Savane 3.1-cleanup1