bugGNU Octave - Bugs: bug #56971, "format short" no longer...


bug #56971: "format short" no longer switches to scientific notation for very large or small values

Submitted by:  Rik <rik5>
Submitted on:  Mon 30 Sep 2019 05:53:01 PM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
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.


Wed 02 Oct 2019 05:08:05 AM UTC, comment #1: 

Fixed in this changeset https://hg.savannah.gnu.org/hgweb/octave/rev/6e8dac65d405.

Closing report.

Rik <rik5>
Project Administrator
Mon 30 Sep 2019 05:53:01 PM UTC, original submission:  

There has been a regression with "format short" and small or large numbers.  It used to be that the format would automatically switch to scientific notation when the number got pretty large or pretty small.  Now (dev branch), Octave correctly displays the number of significant digits (5 for short format), but will display as many '0's as required which is new behavior.

What should happen when we have small numbers?  Should we end up printing a lot of zeros?  That is what happens now.

x = [-pi, 0, pi];
ans =


Before, we would switch over to scientific notation at a certain point.  These are the results from version 3.4.3

octave-3.4.3:5> x*1e-3
ans =


octave-3.4.3:6> x*1e-4
ans =


I think we should change back to changing the format as necessary to keep the numbers more readable.

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 pantxo (Updated the item)
  • -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
    2019-10-02 pantxo Open/ClosedOpen => Closed
    2019-10-02 rik5 StatusConfirmed => Fixed

    Back to the top

    Powered by Savane 3.5