40 inline double dabs(
double d){
return d>0?d: -d;}
41 inline int min(
int n1,
int n2){
return n1 < n2 ? n1 : n2;}
45 StMicky::StMicky(){ Minit(); }
48 void StMicky::Prtest(){
49 if (param_1.ntest <= 0 )
return;
50 if (param_1.nfail) cout <<
" TESTS FAIL ";
51 else cout <<
" Tests pass ";
52 for (
int i =0;i<=param_1.ntest;i++) cout << param_1.mtestv[i] <<
" ";
65 } equiv_7 = { {
' ',
' ',
' ',
' ',
'0',
' ',
' ',
' ',
'1',
' ',
' ',
66 ' ',
'2',
' ',
' ',
' ',
'3',
' ',
' ',
' ',
'4',
' ',
' ',
67 ' ',
'5',
' ',
' ',
' ',
'6',
' ',
' ',
' ',
'7',
' ',
' ',
68 ' ',
'8',
' ',
' ',
' ',
'9',
' ',
' ',
' ',
'A',
' ',
' ',
69 ' ',
'B',
' ',
' ',
' ',
'C',
' ',
' ',
' ',
'D',
' ',
' ',
70 ' ',
'E',
' ',
' ',
' ',
'F',
' ',
' ',
' ',
'G',
' ',
' ',
71 ' ',
'H',
' ',
' ',
' ',
'I',
' ',
' ',
' ',
'J',
' ',
' ',
72 ' ',
'K',
' ',
' ',
' ',
'L',
' ',
' ',
' ',
'M',
' ',
' ',
73 ' ',
'N',
' ',
' ',
' ',
'O',
' ',
' ',
' ',
'P',
' ',
' ',
74 ' ',
'Q',
' ',
' ',
' ',
'R',
' ',
' ',
' ',
'S',
' ',
' ',
75 ' ',
'T',
' ',
' ',
' ',
'U',
' ',
' ',
' ',
'V',
' ',
' ',
76 ' ',
'W',
' ',
' ',
' ',
'X',
' ',
' ',
' ',
'Y',
' ',
' ',
77 ' ',
'Z',
' ',
' ',
' ',
'+',
' ',
' ',
' ',
'-',
' ',
' ',
78 ' ',
'=',
' ',
' ',
' ',
'*',
' ',
' ',
' ',
'/',
' ',
' ',
79 ' ',
'(',
' ',
' ',
' ',
')',
' ',
' ',
' ',
'.',
' ',
' ',
80 ' ',
',',
' ',
' ',
' ',
'\'',
' ',
' ',
' '}, 0 };
82 #define mbcd ((int *)&equiv_7)
88 ia = (
int *)(&(_BLNK__1.a));
89 ib = (
int *)(&(_BLNK__1.b));
91 da = (
double *)(&(_BLNK__1.a));
92 db = (
double *)(&(_BLNK__1.b));
98 for (j = 1; j <= 47; ++j) _BLNK__1.ibcd[j - 1] = mbcd[j - 1];
99 for (j = 1; j <= 100; ++j) _BLNK__1.intg[j - 1] = j;
104 param_1.zerov[0] = (
float)1e-10;
105 param_1.zerov[1] = (float)1e-6;
106 param_1.zerov[2] = (float)1e-5;
107 param_1.zerov[3] = (float)1e-4;
108 param_1.zerov[4] = (float).001;
109 param_1.zergu = param_1.zerov[0];
110 param_1.zerlev = param_1.zerov[0];
117 cout <<
" MICKY executing." << endl;
118 cout <<
" MICKY 2.71 950712 9.30" << endl;
126 void StMicky::Mverif(
int ntt,
float *have,
float *amust,
int nn)
132 float diff, test[200], zeru;
133 int j, nhave, ntuse, n1, n2;
150 cout << endl <<
" VERIFF VECTOR FOR TEST" << ntuse
151 <<
" MORE THAN 200 WORDS, namely " << nhave << endl;
155 zeru = param_1.zerlev;
156 if (param_1.ntest >= 10) StMicky::Prtest();
159 for (jj = 1; jj <= nhave; ++jj) {
161 diff = (r__1 = have[j] - amust[j], dabs(r__1));
162 if (diff < zeru)
continue;
163 sum = (r__1 = have[j] + amust[j], dabs(r__1));
165 if (sum < 2. || (diff * (
float)2. / sum > zeru))
goto L41;
174 param_1.mtestv[param_1.ntest - 1] = ntuse;
175 if (param_1.neachp == 0) return ;
182 if (param_1.nfail == 0) Prtest();
183 else if (param_1.nfail > param_1.nfaipr) ++param_1.nfail;
185 cout <<
" TEST " << ntuse <<
" FAILED, Dump follows" << endl;
190 n2 = min(n1 + 4,nhave);
191 cout << n1 <<
" MUST ";
192 for (j = n1; j <= n2; ++j) {
194 cout << amust[j] <<
" ";
195 if ((j-n1)%5 == 0) cout << endl;
200 for (j = n1; j <= n2; ++j) {
202 cout << have[j] <<
" ";
203 if ((j-n1)%5 == 0) cout << endl;
208 }
while (n1 <= nhave);
210 if (n1 - 1 != nhave) cout << endl;
214 cout <<
" Floating point values, ZERLEV= "<< zeru << endl;
216 for (j = jj; j <= nhave; ++j) {
217 diff = (r__1 = have[j] - amust[j], dabs(r__1));
218 sum = (r__1 = have[j] + amust[j], dabs(r__1));
219 test[j - 1] = (float)0.;
220 if (diff < zeru)
continue;
222 if (sum < (
float)2.)
continue;
223 test[j - 1] = test[j - 1] * (float)2. / sum;
229 n2 = min(n1 + 4,nhave);
230 cout << n1 <<
" MUST ";
231 for (j = n1; j <= n2; ++j) {
232 cout << amust[j] <<
" ";
233 if ((j-n1)%5 == 0) cout << endl;
238 for (j = n1; j <= n2; ++j) {
239 cout << have[j] <<
" ";
240 if ((j-n1)%5 == 0) cout << endl;
245 for (j = n1; j <= n2; ++j) {
246 cout << test[j - 1] <<
" ";
247 if ((j-n1)%5 == 0) cout << endl;
252 }
while (n1 <= nhave);
259 void StMicky::Newguy(
const char *t1,
const char *t2) {
262 cout <<
" ---------------------------------------------------------------" << endl <<
263 " Routing " << t2 <<
" testing " << t1 << endl;