octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test fftfilt fail w/ current tip


From: Daniel J Sebald
Subject: Re: test fftfilt fail w/ current tip
Date: Tue, 23 Jul 2013 19:46:10 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 07/23/2013 01:46 PM, John W. Eaton wrote:
On 07/23/2013 02:39 PM, Dmitri A. Sergatskov wrote:
octave:3> test fftfilt
***** test
b = [1 1];
x = [1, zeros(1,9)];
assert (fftfilt (b, x ), [1 1 0 0 0 0 0 0 0 0] );
assert (fftfilt (b, x.'), [1 1 0 0 0 0 0 0 0 0].');
assert (fftfilt (b.',x ), [1 1 0 0 0 0 0 0 0 0] );
assert (fftfilt (b.',x.'), [1 1 0 0 0 0 0 0 0 0].');
assert (fftfilt (b, [x.' x.']), [1 1 0 0 0 0 0 0 0 0].'*[1 1]);
assert (fftfilt (b, [x.'+eps x.']) == [1 1 0 0 0 0 0 0 0 0].'*[1 1],
[false(10, 1) true(10, 1)]);
!!!!! test failed
assert (fftfilt (b, [x.' + eps, x.']) == [1, 1, 0, 0, 0, 0, 0, 0, 0,
0].' * [1, 1],[false(10, 1), true(10, 1)]) expected
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
but got
1 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
values do not match
shared variables
scalar structure containing the fields:

b = [](0x0)
x = [](0x0)
r = [](0x0)

hg tip
changeset: 17035:08f0e372d006
tag: tip
user: Torsten <address@hidden <mailto:address@hidden>>
date: Mon Jul 22 23:18:50 2013 +0200
summary: doc viewer: correct the anchor position of the desired doc
entry

Test passes with 3.6.4.

Dmitri.
--


Yes, this has been failing ever since Dan and Jordi did some work on
fftfilt to fix bug #37297.

I looks like the test that is failing is supposed to test the arithmetic of the case when the inputs are not integer. When the inputs are integer (second column), the result is "cast" to integer by dropping the floating portion. In the first column the inputs are not all integer so the epsilon should be left intact. However, perhaps because of machine precision the epsilon is being lost and it just so happens the output is exactly 1.

Dmitri, on your system, please test a larger discrepancy, say 2*eps or 3*eps:

assert (fftfilt (b, [x.'+2*eps x.']) == [1 1 0 0 0 0 0 0 0 0].'*[1 1], [false(10, 1) true(10, 1)]);

Others have wanted these types of epsilon tests as tight as possible, but I'm content with 10*eps. (I do like the idea though from a few weeks ago of making an epsilon function for which the input can be a vector containing magnitudes so that accuracy of some functions of diminishing value can be checked.)

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]