bugGNU Octave - Bugs: bug #56938, format long displays 17...

 
 

bug #56938: format long displays 17 significant digits when fixed_point_format is true

Submitter:  Rik <rik5>
Submitted:  Mon 23 Sep 2019 06:26:22 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 28 Sep 2019 11:22:47 AM UTC, comment #2: 

Fixed in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/05f84e5cb08a).  Closing report.

Rik <rik5>
Group administrator
Fri 27 Sep 2019 09:21:55 PM UTC, comment #1: 

The regression has been fixed on the development branch.  However, the extra digit with fixed_point_format still remains.

Rik <rik5>
Group administrator
Mon 23 Sep 2019 06:26:22 PM UTC, original submission:  

When "format long" is used to display matrices the base format is an exponential even if the value to display does not require it.

Sample Octave session showing the difference between scalars and matrices.


octave:10> format long
octave:11>  x = pi
x =  3.141592653589793
octave:12> x = [-pi; 0; pi]
x =

  -3.141592653589793e+00
                       0
   3.141592653589793e+00


For reference, Matlab displays "3.141592653589793" for both.

Also related, if fixed_point_format is set to true then exponential format is turned off, but there is one too many significant figures printed.



octave:18> fixed_point_format (1);
octave:19> x
x =

  -3.1415926535897931
                    0
   3.1415926535897931



Rik <rik5>
Group administrator

 

(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 (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-28 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-09-27 rik5 Item GroupRegression Inaccurate Result
        SummaryRegression in &quot;format long&quot; display between version 4.2 and 4.4 format long displays 17 significant digits when fixed_point_format is true

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code