octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34696] num2str needs more space for vector do


From: anonymous
Subject: [Octave-bug-tracker] [bug #34696] num2str needs more space for vector doubles
Date: Sun, 30 Oct 2011 08:34:53 +0000
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

URL:
  <http://savannah.gnu.org/bugs/?34696>

                 Summary: num2str needs more space for vector doubles
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sun 30 Oct 2011 08:34:52 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: sam sirlin
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.3
        Operating System: *BSD

    _______________________________________________________

Details:

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";
)





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34696>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]