[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56971] "format short" no longer switches to s
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56971] "format short" no longer switches to scientific notation for very large or small values |
Date: |
Mon, 30 Sep 2019 13:53:03 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0 |
URL:
<https://savannah.gnu.org/bugs/?56971>
Summary: "format short" no longer switches to scientific
notation for very large or small values
Project: GNU Octave
Submitted by: rik5
Submitted on: Mon 30 Sep 2019 10:53:01 AM PDT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
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];
x*1e-6
ans =
-0.0000031416
0
0.0000031416
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 =
-0.0031416
0.0000000
0.0031416
octave-3.4.3:6> x*1e-4
ans =
-3.1416e-04
0.0000e+00
3.1416e-04
I think we should change back to changing the format as necessary to keep the
numbers more readable.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56971>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #56971] "format short" no longer switches to scientific notation for very large or small values,
Rik <=