bugGNU Octave - Bugs: bug #53169, format free displays 1 more digit...


bug #53169: format free displays 1 more digit than short format

Submitted by:  Rik <rik5>
Submitted on:  Fri 16 Feb 2018 01:28:06 AM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
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.


Fri 16 Feb 2018 04:44:41 PM UTC, comment #3: 

I checked in a changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/d277debe9c2f) that more fully documents the "free", "+", and "bank" formats.

Marking bug as fixed and closing report.

Rik <rik5>
Project Administrator
Fri 16 Feb 2018 05:24:59 AM UTC, comment #2: 

I'm not sure it is a super useful format, but I don't mind keeping it around.  I think just documenting it would be enough.

Rik <rik5>
Project Administrator
Fri 16 Feb 2018 05:07:51 AM UTC, comment #1: 

Format free is supposed to be what you would get using the simplest output from C++ using "std::cout << d" with default settings or Fortran's print *, d (free format).

Maybe it's not that useful and could be deprecated.  But I don't know that anything needs to be fixed with the format itself if we decide to keep it.  Maybe explain it better?

John W. Eaton <jwe>
Project Administrator
Fri 16 Feb 2018 01:28:06 AM UTC, original submission:  

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 =


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



Example 2:

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


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


Example 3:

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


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.

Rik <rik5>
Project Administrator


(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 jwe (Posted a comment)
  • -email is unavailable- added by rik5 (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-16 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5