20 Jul
2007
20 Jul
'07
12:15 p.m.
yes, but your program does not add full precision number isn't ? I modified your loop the following way. int main() { double i, s; unsigned long k; i = 0.0; s = 0.0; for (k=0; k<50000000; ++k) { i+=1.0; s+=1.0/i; } printf("%f %f\n", i, s); } with the same compile : i.e : gcc -W -Wall -O2 boucle.c -o boucle boucle.c being the program name When ran it gives this result : 50000000.000000 18.304749 one second later simon plouffe