[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56936] format short displays 6, rather than 5
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56936] format short displays 6, rather than 5, significant digits as documented |
Date: |
Mon, 23 Sep 2019 14:02:07 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<https://savannah.gnu.org/bugs/?56936>
Summary: format short displays 6, rather than 5, significant
digits as documented
Project: GNU Octave
Submitted by: rik5
Submitted on: Mon 23 Sep 2019 11:02:05 AM PDT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
According to the documentation, "format short" (default), should display 5
significant figures. It does so for scalars, but not for matrices.
octave:16> format short
octave:17> x = pi
x = 3.1416
octave:18> x = [-pi;0;pi]
x =
-3.14159
0
3.14159
octave:19> diary off
For comparison, Matlab displays "3.1416" in both cases.
This is probably a bug in pr-output.cc in the routines
make_real_matrix_format, make_complex_matrix_format,
make_complex_scalar_format). It looks like the number of figures to the right
of the decimal point is being set at the precision.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56936>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56936] format short displays 6, rather than 5, significant digits as documented,
Rik <=