[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33164] test 2 of residue.m sometimes fails
From: |
Andreas Weber |
Subject: |
[Octave-bug-tracker] [bug #33164] test 2 of residue.m sometimes fails |
Date: |
Tue, 26 Apr 2011 08:29:28 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20110323 Iceweasel/3.5.16 (like Firefox/3.5.16) |
URL:
<http://savannah.gnu.org/bugs/?33164>
Summary: test 2 of residue.m sometimes fails
Project: GNU Octave
Submitted by: andy1978
Submitted on: Di 26 Apr 2011 08:29:27 GMT
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
hg id
83fa84ef63ca
octave:1> test residue.m
PASSES 4 out of 4 tests
octave:2> test residue.m
PASSES 4 out of 4 tests
octave:3> test residue.m
***** test
b = [1, 0, 1];
a = [1, 0, 18, 0, 81];
[r, p, k, e] = residue (b, a);
r1 = [-5i; 12; +5i; 12]/54;
p1 = [+3i; +3i; -3i; -3i];
assert (abs (r - r1) < 1e-12 && abs (p - p1) < 1e-12
&& isempty (k)
&& e == [1; 2; 1; 2]);
[br, ar] = residue (r, p, k);
assert ((abs (br - b) < 1e-12
&& abs (ar - a) < 1e-12));
!!!!! test failed
assert ((abs (br - b) < 1e-12 && abs (ar - a) < 1e-12)) failed
octave:4> test residue.m
PASSES 4 out of 4 tests
octave:5> test residue.m
PASSES 4 out of 4 tests
octave:6> test residue.m
***** test
b = [1, 0, 1];
a = [1, 0, 18, 0, 81];
[r, p, k, e] = residue (b, a);
r1 = [-5i; 12; +5i; 12]/54;
p1 = [+3i; +3i; -3i; -3i];
assert (abs (r - r1) < 1e-12 && abs (p - p1) < 1e-12
&& isempty (k)
&& e == [1; 2; 1; 2]);
[br, ar] = residue (r, p, k);
assert ((abs (br - b) < 1e-12
&& abs (ar - a) < 1e-12));
!!!!! test failed
assert (abs (r - r1) < 1e-12 && abs (p - p1) < 1e-12 && isempty (k) && e ==
[1; 2; 1; 2]) failed
I made a copy of the test which fails and ran it seperately (marked important
lines with @):
octave:129> b = [1, 0, 1];
octave:130> a = [1, 0, 18, 0, 81];
@octave:131> [r, p, k, e] = residue (b, a);
@warning: matrix singular to machine precision, rcond = 3.47046e-161
octave:132> r1 = [-5i; 12; +5i; 12]/54;
octave:133> p1 = [+3i; +3i; -3i; -3i];
@octave:134> abs (r - r1)
@ans =
@ 0.092593
@ 0.222222
@ 0.092593
@ 0.222222
octave:135> abs (p - p1)
ans =
1.3323e-15
1.3323e-15
1.3323e-15
1.3323e-15
octave:136> k
k = [](0x0)
octave:137> e
e =
1
2
1
2
octave:138> assert (abs (r - r1) < 1e-12 && abs (p - p1) < 1e-12
> && isempty (k)
> && e == [1; 2; 1; 2]);
error: assert (abs (r - r1) < 1e-12 && abs (p - p1) < 1e-12 && isempty (k) &&
e == [1; 2; 1; 2]) failed
error: called from:
error: /home/andy/build-octave/../octave/scripts/testfun/assert.m at line
74, column 1
octave:138> [br, ar] = residue (r, p, k);
octave:139> assert ((abs (br - b) < 1e-12
> && abs (ar - a) < 1e-12));
error: assert ((abs (br - b) < 1e-12 && abs (ar - a) < 1e-12)) failed
error: called from:
error: /home/andy/build-octave/../octave/scripts/testfun/assert.m at line
74, column 1
Andy
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33164>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #33164] test 2 of residue.m sometimes fails,
Andreas Weber <=