bugGNU Octave - Bugs: bug #62544, Variable editor fails to display...

 
 

bug #62544: Variable editor fails to display matrix after fixed_point_format(true)

Submitter:  None
Submitted:  Mon 30 May 2022 06:54:00 AM UTC
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  pingplug Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.1.0
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Thu 02 Jun 2022 03:20:36 PM UTC, comment #7: 

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.

Rik <rik5>
Project Administrator
Wed 01 Jun 2022 12:19:29 AM UTC, comment #6: 

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

Rik <rik5>
Project Administrator
Tue 31 May 2022 05:49:29 AM UTC, comment #5: 

The attached change appears to fix the problem for me.

(file #53260)

John W. Eaton <jwe>
Project Administrator
Mon 30 May 2022 09:35:23 PM UTC, comment #4: 

Just seems to be the display routine.  I can edit variables in the Variable Editor and they are correctly changed in Octave.

Rik <rik5>
Project Administrator
Mon 30 May 2022 09:30:17 PM UTC, comment #3: 

Apparently this goes way back.  Both versions 6.4 and 5.2 have the same fault.

Rik <rik5>
Project Administrator
Mon 30 May 2022 09:24:52 PM UTC, comment #2: 

Confirmed with 7.1 and 8.0 (on Linux) as well.

Rik <rik5>
Project Administrator
Mon 30 May 2022 08:56:15 AM UTC, comment #1: 

yes, observe that in current dev 8.0.0 as well.

A.R. Burgers <arb>
Mon 30 May 2022 06:54:00 AM UTC, original submission:  

>> 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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53260:  edit-display-diff.txt added by jwe (269B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by arb (Posted a comment)
  • -email is unavailable- added by None (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 project members can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-02 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2022-05-31 jwe Attached File- Added edit-display-diff.txt, #53260
    2022-05-30 rik5 Item GroupNone Incorrect Result
        StatusNone Confirmed

    Back to the top


    Powered by Savane 3.9