// $Id: main.c 115 2009-04-20 21:29:17Z rosiere $ //=====[ main ]================================================================= /* * All thread execute this routine * Initialize the thread and attribute a Workload at each thread */ #include "func_math.h" #include "func_fibonnacci.h" #include "func_premier.h" #include "func_factoriel.h" #include "func_io.h" #define mul(x,y) x*y unsigned int f1 (unsigned int x) { if ( x <= 1) return 1; unsigned int res = mul (x , f1 (x-1)); return res; } unsigned int f2 (unsigned int x) { unsigned int res= 1; while (x > 1) { res = mul(res,x); x --; } return res; } int main() { for (int i=0; i<500; ++i) if (f2 (12) != 479001600) quit(i); quit(0); }