Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
( Jump to the original submission )
I checked in jwe's patch under his name here: https://hg.savannah.gnu.org/hgweb/octave/rev/b5902106c043.
I think that fixes this particular issue. I will file another bug report about the differences in fixed_point_format between Octave and Matlab.
It does fix the problem, although I don't think I understand the rest of the way fixed_point_format is supposed to behave. According to the documentation,
The scaled format prints a scaling factor on the first line of output chosen such that the largest matrix element can be written with a single leading digit.
It then gives the example
fixed_point_format (true) logspace (1, 7, 5)' ans = 1.0e+07 * 0.00000 0.00003 0.00100 0.03162 1.00000
which seems alright. But,
octave:12> fixed_point_format (true) octave:13> x = [1e1; 1e3; 1e5; 1e7] x = 10 1000 1e+05 1e+07
In this case, why isn't the 1e7 factor extracted and presented at the top as before?
It seems to require that one of the variables must have at least 8 significant digits. For example,
x(3) = 1.234567e5 x = 1.0e+07 * 0.0000 0.0001 0.0123 1.0000
The attached change appears to fix the problem for me.
(file #53260)
Just seems to be the display routine. I can edit variables in the Variable Editor and they are correctly changed in Octave.
Apparently this goes way back. Both versions 6.4 and 5.2 have the same fault.
Confirmed with 7.1 and 8.0 (on Linux) as well.
yes, observe that in current dev 8.0.0 as well.
>> a=0.3; >> b=ones(3); >> fixed_point_format(true);
then in variable editor, a is 0.3, but b is Inf
tested in Linux and Windows
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
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 project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 5 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9