bugGNU Octave - Bugs: bug #43273, class of bitwise functions is...


bug #43273: class of bitwise functions is incorrect when using boolean

Submitted by:  CarnĂ« Draug <carandraug>
Submitted on:  Sun 21 Sep 2014 09:22:58 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


Thu 02 Oct 2014 03:39:15 AM UTC, comment #5: 

I've finally pushed my fix for this, all tests are now passing.


Mike Miller <mtmiller>
Project Administrator
Sun 28 Sep 2014 12:59:09 AM UTC, comment #4: 

@Mike: Oh no, I've got my hands full trying to fix all of the weird behaviors with max/min.  I haven't done anything with the bitfcns.


Rik <rik5>
Project Administrator
Sat 27 Sep 2014 10:10:03 PM UTC, comment #3: 

Rik, are you saying you're working on fixing both bitfcns and max/min together? If not, I have a fix ready to push for bitfcns.

Mike Miller <mtmiller>
Project Administrator
Fri 26 Sep 2014 02:57:31 AM UTC, comment #2: 

The same thing is present with the two argument form of the max()/min() functions.

class (max (true, false))
=> double

I've fixed it already in my own repo, but am going to try and tidy up a few more things before pushing it.

Rik <rik5>
Project Administrator
Thu 25 Sep 2014 11:21:33 AM UTC, comment #1: 

Good catch. I see where this case is happening, line 171 of bitfcns.cc. I added a bunch of the casting logic here a while ago to fix bug #34502, I can probably figure out what needs to be added if no one gets to it first.

Mike Miller <mtmiller>
Project Administrator
Sun 21 Sep 2014 09:22:58 PM UTC, original submission:  

Found during the code sprint

octave> a = bitand (true, true)
a =  1
octave> class (a)
ans = double

The output should have been of class logical. The same error happens in bitor, and bitxor. I have added tests to this functions which are failing.

Carnë Draug <carandraug>
Project Member


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

Attach Files:

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 rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by carandraug (Submitted the item)

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

    Only project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-02 mtmiller StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2014-09-25 mtmiller CategoryDocumentation => Octave Function
        StatusNone => Confirmed
        Operating SystemGNU/Linux => Any

    Back to the top

    Powered by Savane 3.5