bugGNU Octave - Bugs: bug #40562, Consider using...


bug #40562: Consider using PRINTF_EXPONENT_DIGITS on MinGW

Submitted by:  Rik <rik5>
Submitted on:  Wed 13 Nov 2013 04:34:09 AM UTC  
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

Add a New Comment(Rich Markup)

You are not logged in

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


Thu 24 Nov 2016 09:53:23 PM UTC, comment #3:

This bug seems out of date. I'm going to close it.

Rik <rik5>
Project Administrator
Wed 23 Nov 2016 10:02:47 PM UTC, comment #2:

Is this issue still relevant with the Octave version 4.2.0? Or can it be closed now?

When I do "assert (3+2*eps, 3, eps)" (this is one of the mentioned tests that needed fixing) then I get

  • on linux (Ubuntu 14.04) the error message "Abs err 4.4409e-16 exceeds..."
  • on Windows (official w32 installer) also the very same error message "Abs err 4.4409e-16 exceeds..."

So both error text string have 2-digit exponents by default, no 3-digit exponent on Windows any more.

Hartmut <hardy>
Wed 13 Nov 2013 03:27:33 PM UTC, comment #1:

FYI, run natively on a Win 8 machine at work (3.7.7+ dev versio of Nov 11):

so this environment setting doesn't seem to make much difference. At first looks it's indeed about 5 % slower.

After resetting it with

>> setenv ("PRINTF_EXPONENT_DIGITS", "")

the execution times didn't go down to ~4.27 secs as before, however. Octave needed to restart to get the original times from before this setting.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 13 Nov 2013 04:34:09 AM UTC, original submission:

I worked around the problem of failing tests on MinGW because of 3-digit exponents here (http://hg.savannah.gnu.org/hgweb/octave/rev/6a381b9ae055).

However, I went on to investigate whether PRINTF_EXPONENT_DIGITS carries a performance penalty as claimed. I found something like a 5% penalty, not a 300-400% penalty, so this might be a worthwhile option to turn on.

I used

x = rand (1e6, 1);
fid = fopen ("tst.txt", "wt");
tic; fprintf (fid, "%g\n", x); toc
fclose (fid)

Then I did the same test after using


I was running in a virtual machine and the timing precision on MinGW isn't great, but the measured difference was small (~5%) with three runs for each scenario.

Rik <rik5>
Project Administrator


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-24 rik5 StatusNone => Wont Fix
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3