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 Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  John W. Eaton <jwe>
Originator Name:  Michael Leitner Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  dev
Operating System:  GNU/Linux

Add a New Comment(Rich 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 Administrator
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:


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



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

Attach Files:

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
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)

    Do you think this task is very important?
    If so, you can 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 UTC jwe StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    Wed 30 Oct 2013 07:48:30 AM UTC mtmiller Attached File- => Added oct-toc.diff, #29505
    Wed 30 Oct 2013 07:29:12 AM UTC jwe Assigned toNone => jwe
    Tue 29 Oct 2013 01:28:28 AM UTC mtmiller StatusNone => Confirmed
        Release3.6.2 => dev

    Back to the top

    Powered by Savane 3.3