*** empty log message ***

This commit is contained in:
jiri
2006-09-11 23:07:22 +00:00
parent e49b73e9e9
commit d55727cb83
5 changed files with 71 additions and 24 deletions

14
t.cc
View File

@@ -675,9 +675,12 @@ int n;
double f;
cin>>n >>f ;
NRMat<double> a(n,n);
for(int i=0;i<n;++i) for(int j=0;j<n;++j)
NRVec<double>u(n),v,w;
for(int i=0;i<n;++i)
{
a(i,j)= f*random()/(1.+RAND_MAX);
u[i]=f*random()/(1.+RAND_MAX);
for(int j=0;j<n;++j)
a(i,j)= f*random()/(1.+RAND_MAX);
}
//cout <<"a matrix \n"<<a;
//cout<<"EXP\n";
@@ -695,6 +698,13 @@ c=exp(a,false);
cout <<" tricky exp took "<<clock()/((double) (CLOCKS_PER_SEC))-t<<endl;
cout<<"error2 = "<<(c-b).norm()/b.norm()<<endl;
v=b*u;
t=clock()/((double) (CLOCKS_PER_SEC));
w=exptimes(a,u);
cout <<"exptimes took "<<clock()/((double) (CLOCKS_PER_SEC))-t<<endl;
cout <<"error of exptimes = "<<(v-w).norm()/v.norm()<<endl;
}