Mercurial > hg > CbC > old > device
comparison test/int.c @ 748:c2c709727221
i64 continue... basic.s assembled.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 13 Nov 2010 22:39:40 +0900 |
parents | 5d3b4669854c |
children | 43b9c46a3c95 |
comparison
equal
deleted
inserted
replaced
747:d4bc10fe7362 | 748:c2c709727221 |
---|---|
373 int | 373 int |
374 test2(int f,int i) | 374 test2(int f,int i) |
375 { | 375 { |
376 int g,h,s; | 376 int g,h,s; |
377 | 377 |
378 printf("#0370:rec: %d %d\n",i,f); | 378 printf("#0377:rec: %d %d\n",i,f); |
379 if (i<=0) return f; | 379 if (i<=0) return f; |
380 g = f*2; | 380 g = f*2; |
381 h = f-3.5; | 381 h = f-3.5; |
382 #if 1 | 382 #if 1 |
383 printf("#0371:rec: %d %d\n",i,f); | 383 printf("#0382:rec: %d %d\n",i,f); |
384 s = f*1.5; | 384 s = f*1.5; |
385 printf("#0372: %d\n", s); | 385 printf("#0384: %d\n", s); |
386 s = test2(s,i-1); | 386 s = test2(s,i-1); |
387 printf("#0373: %d\n", s); | 387 printf("#0386: %d\n", s); |
388 s = s/(h-1); | 388 s = s/(h-1); |
389 printf("#0374: %d\n", s); | 389 printf("#0388: %d\n", s); |
390 printf("#0375: %d\n", h/3-(3.0-(g+3)*s/(h-1))); | 390 printf("#0389: %d\n", h/3-(3.0-(g+3)*s/(h-1))); |
391 #endif | 391 #endif |
392 return h/3-(3.0-(g+3)*test2(f*1.5,i-1)/(h-1)); | 392 return h/3-(3.0-(g+3)*test2(f*1.5,i-1)/(h-1)); |
393 } | 393 } |
394 | 394 |
395 int | 395 int |
396 test3(int base,int base1) | 396 test3(int base,int base1) |
397 { | 397 { |
398 int i,j; | 398 int i,j; |
399 for(i=0;i<10;i++) { | 399 for(i=0;i<10;i++) { |
400 for(j=0;j<10;j++) { | 400 for(j=0;j<10;j++) { |
401 printf("#0392:%d ",(base+i)%(base1+j)); | 401 printf("#0400:%d ",(base+i)%(base1+j)); |
402 } | 402 } |
403 printf("#0394:\n"); | 403 printf("#0402:\n"); |
404 } | 404 } |
405 return 0; | 405 return 0; |
406 } | 406 } |