Sun 25 Jan 2015 06:30:34 AM UTC, comment #9:
I applied your fix in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e68267373191) since it doesn't seem to hurt anything to calculate it in this manner, and it solves this bug.
|
Sat 13 Dec 2014 06:40:55 PM UTC, comment #8:
Hi,
Just to summarize the situation:
"test chop" does not fail on Linux (both cli & gui),
and does not fail on windows mxe cli.
(I have used last mxe version)
on windows mxe gui the situation is complicated:
1. test chop fails
2. _run_test_suite_ does not fail
3. running again test chop after _run_test_suite_ does not fail
My patch does not changed the situation in Linux, and in
windows-cli, but solves the first failure in windows gui version
Thanks,
Avinoam
|
Fri 12 Dec 2014 09:30:47 PM UTC, comment #7:
Does your patch which uses 1/inflate solve the problem on all platforms (Linux + Windows) and both CLI and GUI versions?
I don't see anything wrong with it and that would be a quick solution.
|
Sat 06 Dec 2014 04:41:26 PM UTC, comment #6:
Hi,
I do not think that adding a tolerance here is a good solution.
I would expect that chop(e,3) and 2.72 will have the same
numerical error, so that even though computer 2.72 will
not be the mathematical 2.72, due to limited binary representation,
but chop (e,3)-2.72 should be zero.
But...
Thanks,
Avinoam
|
Sat 06 Dec 2014 03:52:31 PM UTC, comment #5:
I'm tempted to fix this particular report by just adding a tolerance to the built-in self test. When doing numerical calculations on computers one can't really expect to do better than the machine precision. So while this is annoying that the answer is not exact, it is what you would expect.
|
Sat 06 Dec 2014 03:31:51 PM UTC, comment #4:
Hi.
Test output in Windows 3.8.2 GUI version,
using last mxe version from http://hg.octave.org/mxe-octave/
This is actually an example of bug 43741.
But there is some strange behaviour:
1. _run_test_suite_ in the same version does not produce this error
2. neither test chop nor _run_test_suite_ in cli version produce this error.
Avinoam
|
Fri 05 Dec 2014 09:25:55 PM UTC, comment #3:
@Avinoam: Could you post the output of the tests when they fail? Is is just a tolerance that could be increased on the %!assert test?
|
Tue 02 Dec 2014 05:18:34 AM UTC, comment #2:
Hi again,
from some reason, this bug appears only in gui version,
and not in the cli version.
Avinoam
|
Mon 01 Dec 2014 10:41:14 PM UTC, comment #1:
The patch
(file #32581)
|
Mon 01 Dec 2014 10:39:17 PM UTC, original submission:
Hi,
in Octave ver. 3.8.2, in Microsoft Windows,
chop.m fails in 9 of 10 tests, while in linux it passes all the
tests.
The reason is probably fom the fact the in windows version
10^(-n) - 1./10^n
is not equal zero.
changing the line
deflate = 10 .^ (tmp - ndigits);
to
deflate = 1./inflate;
solve this problem, and chop.m passes all the tests.
Please check this.
A patch is attached.
Avinoam
|