0001
0002
0003
0004
0005
0006
0007
0008 #include <stdio.h>
0009 #include <stdlib.h>
0010 #include <math.h>
0011 #include "tensor.h"
0012
0013 void ReadBinary_DKE(char* file, struct Tensor *A);
0014 DOUBLE absolute(DOUBLE a);
0015
0016 void main(int argc, char **args){
0017 int i;
0018 struct Tensor A,B;
0019 char *file= args[1];
0020 char *file2= args[2];
0021 int a=0;
0022 printf("%c\n",file);
0023 ReadBinary_DKE(file,&A);
0024 ReadBinary_DKE(file2,&B);
0025 if(a==0){
0026 for(i=0;i"(A-B)/B[%i]=%g\n",i,(A.vals[i]-B.vals[i])/(B.vals[i]));
0028 }
0029 }
0030 if(a==1){
0031 if(A.size!=B.size){printf("dimensiosn inconsitency\n");}
0032 else {
0033 for(i=0;iif(absolute((A.vals[i]-B.vals[i])/B.vals[i])>0.001){printf("i=%i",i);}
0035 }
0036 }
0037 }
0038 }