bugGNU Octave - Bugs: bug #34696, num2str needs more space for...

 
 

bug #34696: num2str needs more space for vector doubles

Submitter:  None
Submitted:  Sun 30 Oct 2011 08:34:52 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  sam sirlin Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.4.3
Operating System:  * BSD Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 11 Apr 2012 04:58:02 AM UTC, comment #1: 

num2str was redrafted in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/34c932e669c8).  This issue has now been fixed.  The change will become visible in release 3.8.0 or you can build from Mercurial sources to get it immediately.

Rik <rik5>
Group administrator
Sun 30 Oct 2011 08:34:52 AM UTC, original submission:  

num2str sometimes runs numbers together with no space:

a = -pi*[1 2 3]*1e12
a =

  -3.1416e+12  -6.2832e+12  -9.4248e+12
num2str(a)
ans = -3.1416e+12-6.2832e+12-9.4248e+12


A simple fix is to use on line 171 of num2str.m
fmt = "%12.5g";

(original line is
 fmt = "%11.5g";
)

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

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-04-11 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2012-04-07 kamaraju Carbon-Copy- Added kamaraju

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code