/* l1 - program protip evaluare viteza de executie a calculelor in virgula flotanta Comanda compilare: >gcc -o l1 l1.c Lansare in executie: >./l1 */ #include #include double a,b=253.768,c=2345.563; int i,j; int start, end; int main(void) { while(1) { start=clock(); for(i=0;i<10000;i++) { for(j=0;j<7000;j++) a=b*c; } end=clock(); printf("%f\n",(double) (end -start)/CLOCKS_PER_SEC);//secunde // printf("%d\n",CLOCKS_PER_SEC); // frecventa CPU } return 0; }