bugGNU Octave - Bugs: bug #47607, Boolean values display with space...

 
 

bug #47607: Boolean values display with space like doubles, but should display like uint8

Submitter:  None
Submitted:  Sat 02 Apr 2016 05:45:14 PM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 02 Apr 2016 10:34:00 PM UTC, comment #2: 

This is fixed on the default branch:

http://hg.savannah.gnu.org/hgweb/octave/rev/d5963a6e29c2

Mike Miller <mtmiller>
Group Member
Sat 02 Apr 2016 06:10:34 PM UTC, comment #1: 

Thanks for the bug report. Agree that this is especially egregious with "format long g" in effect.

Normal output:


>> logical (round (rand (8)))
ans =

   1   1   0   1   1   0   0   1
   1   0   0   0   1   1   0   0
   0   1   1   0   0   1   1   0
   0   0   0   0   0   1   1   0
   0   0   0   0   1   0   1   0
   1   1   0   0   0   1   1   1
   0   0   1   0   1   1   1   1
   0   0   0   0   1   0   0   0

>> int32 (round (rand (8)))
ans =

  1  0  1  0  0  1  1  1
  0  1  0  1  1  0  1  1
  0  0  0  1  1  0  0  0
  0  0  1  1  1  0  0  1
  0  0  1  0  0  1  0  1
  1  1  1  1  1  1  0  0
  1  1  0  0  1  1  0  0
  0  1  1  0  0  0  1  1


Mike Miller <mtmiller>
Group Member
Sat 02 Apr 2016 05:45:14 PM UTC, original submission:  

ID fa58fcb7c51d


>> format long g
>> format compact
>> adj = rand(5,5) >= 0.5;
>> adj
adj =
                     0                     1                     1                     1                     0
                     0                     1                     1                     0                     1
                     1                     1                     0                     0                     0
                     0                     1                     1                     1                     1
                     1                     0                     1                     0                     1
>> uint8(adj)
ans =
  0  1  1  1  0
  0  1  1  0  1
  1  1  0  0  0
  0  1  1  1  1
  1  0  1  0  1
>>


Boolean values are displayed with excessive space, even though int8 and int16 are displayed with proper space. Boolean types have been omitted in libinterp/corefcn/pr-output.cc and are implicitly being treated as doubles?

Anonymous

 

(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 mtmiller (Posted a comment)
  •  

    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.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-02 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-04-02 mtmiller Severity3 - Normal 1 - Wish
        Item GroupInaccurate Result Feature Request
        StatusNone Confirmed
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code