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

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

[Octave-bug-tracker] [bug #53169] format free displays 1 more digit than


From: Rik
Subject: [Octave-bug-tracker] [bug #53169] format free displays 1 more digit than short format
Date: Thu, 15 Feb 2018 20:28:08 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

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

                 Summary: format free displays 1 more digit than short format
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Thu 15 Feb 2018 05:28:06 PM PST
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The free format seems to be a modifier, like "loose" or "compact", rather than
a truly independent format.  However, it messes with the displayed number of
significant figures.

Example 1:


octave:1> format short
octave:2> x = [pi;-1;e]
x =

   3.1416
  -1.0000
   2.7183

octave:3> format free
octave:4> x
x =

 3.14159
 -1
 2.71828


octave:5> 


Example 2:


octave:1> format long
octave:2> x = [pi;-1;e]
x =

   3.14159265358979
  -1.00000000000000
   2.71828182845905

octave:3> format free
octave:4> x
x =

 3.14159
 -1
 2.71828





Example 3:


x = [1.2;1;-pi]
x =

 1.2
 1
 -3.14159


Of course, it is possible that I misunderstand the format and that it is
supposed to use the minimum number of significant figures necessary, but no
more than 6 significant digits, and not to align decimal points.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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