[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34266] Four issues with "residue" and residue
From: |
Bernard Grung |
Subject: |
[Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez" |
Date: |
Sun, 11 Sep 2011 17:08:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0 |
Follow-up Comment #7, bug #34266 (project octave):
%% Here are three residue tests
%%--------------------------------------------------------------------------
fprintf('Start of test1.n' );
fprintf('Inputs are from "test/Sec_A.log" and "test/Sec_G.log".n' );
r=[+1.2021329617e-19;
-7.4688154330e-19;
+6.2666824713e-19;
+4.4832378335e-12];
p=[-3.1415926536e+09;
-4.9964813512e+08;
+0.0000000000e+00;
+0.0000000000e+00];
k=[];
e=[1;1;1;2];
[br,ar]=residue(r,p,k,e);
fprintf('Output br from "residue" is:n' );
br
b=[+1.0,+7.0372976777e+06]
fprintf('Output should be the above value.n' );
fprintf('Output ar from "residue".n' );
ar
a=[+1.0,+3.6412407887e+09,+1.5696909107e+18,+0.0000000000e+00,+0.0000000000e+00]
fprintf('Output should be the above value.n' );
fprintf('End of test 1.nn' );
%%--------------------------------------------------------------------------
fprintf('Start of test2.n' );
fprintf('Inputs are from "test/Sec_C.log" and "test/Sec_E.log".n' );
R=[-1.1858042927e-06;
+8.7069354985e-17;
-5.8397074396e-19;
+4.2697503176e-20];
P=[+9.8641691937e+12;
+1.1657719456e+02;
+1.0000000000e+00;
+1.0000000000e+00];
K=[];
E=[1;1;1;2];
[BR,AR]=residue(R,P,K,E);
fprintf('Output BR from "residue".n' );
BR
B=[-1.0311905052e-21,-6.1959656095e-19,+6.6295899514e-19,+0.0000000000e+00]
fprintf('Output should be the above value.n' );
fprintf('Output AR from "residue".n' );
AR
A=[+1.0,-9.8641691938e+12,+1.1696655096e+15,-2.3097385117e+15,+1.1499371712e+15]
fprintf('Output should be the above value.n' );
fprintf('End of test 2.nn' );
%%--------------------------------------------------------------------------
fprintf('Start of test3.n' );
fprintf('Inputs are from "test/Sec_B.log" and "test/Sec_F.log".n' );
r=[+1.2021329617e-19;
-7.4688154330e-19;
+5.8397074396e-19;
+4.2697503176e-20];
p=[+1.0137701213e-13;
+8.5780070775e-03;
+1.0;
+1.0];
k=[];
e=[1;1;1;2];
[br,ar]=residue (r,p,k,e);
fprintf('Output br from "residue".n' );
br
b=[-4.2697503176e-20,+7.0602275781e-19,-6.1996282043e-19,-1.0311905052e-21]
fprintf('Output should be the above value.n' );
fprintf('Output ar from "residue".n' );
ar
a=[+1.0,-2.0085780071e+00,+1.0171560142e+00,-8.5780070776e-03,+8.6961272755e-16]
fprintf('Output should be the above value.n' );
fprintf('End of test 3.nn' );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Here are the outputs:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Start of test1.
Inputs are from "test/Sec_A.log" and "test/Sec_G.log".
Output br from "residue" is:
br = 7.0373e+06
b =
1.0000e+00 7.0373e+06
Output should be the above value.
Output ar from "residue".
ar =
3.6412e+09 1.5697e+18 0.0000e+00 0.0000e+00
a =
1.0000e+00 3.6412e+09 1.5697e+18 0.0000e+00 0.0000e+00
Output should be the above value.
End of test 1.
Start of test2.
Inputs are from "test/Sec_C.log" and "test/Sec_E.log".
Output BR from "residue".
BR =
1.0883e+04 1.0736e+17
B =
-1.0312e-21 -6.1960e-19 6.6296e-19 0.0000e+00
Output should be the above value.
Output AR from "residue".
AR =
-9.8642e+12 1.1697e+15 -2.3097e+15 1.1499e+15
A =
1.0000e+00 -9.8642e+12 1.1697e+15 -2.3097e+15 1.1499e+15
Output should be the above value.
End of test 2.
Start of test3.
Inputs are from "test/Sec_B.log" and "test/Sec_F.log".
Output br from "residue".
br = 0
b =
-4.2698e-20 7.0602e-19 -6.1996e-19 -1.0312e-21
Output should be the above value.
Output ar from "residue".
ar =
1.0000e+00 -2.0086e+00 1.0172e+00 -8.5780e-03 8.6961e-16
a =
1.0000e+00 -2.0086e+00 1.0172e+00 -8.5780e-03 8.6961e-16
Output should be the above value.
End of test 3.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The results of test 1 should be the same as those given in
"test/Sec_A.log" -- theory
"test/Sec_G.log" -- test function
The results of test 2 should be the same as those given in
"test/Sec_C.log" -- theory
"test/Sec_E.log" -- example
The results of test 2 should be the same as those given in
"test/Sec_B.log" -- theory
"test/Sec_F.log" -- example
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34266>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/10
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez",
Bernard Grung <=
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/11
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/11
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/11
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/14
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Bernard Grung, 2011/09/16
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/16
- [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez", Jordi Gutiérrez Hermoso, 2011/09/29