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.
|
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.
|
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
setenv ("PRINTF_EXPONENT_DIGITS", "2")
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.
|