bugGNU Octave - Bugs: bug #40396, toc precision

 
 

bug #40396: toc precision

Submitted by:  None
Submitted on:  Mon 28 Oct 2013 01:26:22 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: John W. Eaton <jwe>
Originator Name: Michael LeitnerOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 01 Nov 2013 01:53:54 AM UTC, comment #5:

Yeah yours is a much more thorough fix. As long as Octave is well-behaved within itself I'd call this fixed.

Mike Miller <mtmiller>
Project Member
Thu 31 Oct 2013 09:47:28 PM UTC, comment #4:

Mike, I thought about fixing this by forcing the precision in teh toc output, but then decided it would be better to try to ensure that operations on octave_stdout don't set any persistent stream state.

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/f1b59ef34eda

OTOH, we can't prevent people from setting and not restoring the state in .oct files. So maybe we should also set that format in the toc function...

John W. Eaton <jwe>
Project AdministratorIn charge of this item.
Wed 30 Oct 2013 07:48:30 AM UTC, comment #3:

I've attached a diff that works for me. Let me know if this is good enough or if you'd rather fix it in the octave_stdout stream instead.

(file #29505)

Mike Miller <mtmiller>
Project Member
Wed 30 Oct 2013 07:29:12 AM UTC, comment #2:

The problem is that the precision for the octave_stdout stream is being set but not restored in at least one function in pr-output.cc. I'll take a look at fixing this if no one beats me to it.

John W. Eaton <jwe>
Project AdministratorIn charge of this item.
Tue 29 Oct 2013 01:28:28 AM UTC, comment #1:

Confirmed, also present in development version:

Mike Miller <mtmiller>
Project Member
Mon 28 Oct 2013 01:26:22 PM UTC, original submission:

The elapsed time as displayed by toc incorrectly reuses the formatting of the previous displayed number:
or even
Displaying a number with more digits after the decimal point helps:
Note that the number really has to be displayed:

Workaround: disp(toc)

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29505:  oct-toc.diff added by mtmiller (667B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 01 Nov 2013 12:51:28 PM UTCjweStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 30 Oct 2013 07:48:30 AM UTCmtmillerAttached File-=>Added oct-toc.diff, #29505
    Wed 30 Oct 2013 07:29:12 AM UTCjweAssigned toNone=>jwe
    Tue 29 Oct 2013 01:28:28 AM UTCmtmillerStatusNone=>Confirmed
      Release3.6.2=>dev

    Back to the top


    Powered by Savane 3.1-cleanup