QUOTE(born2c0de @ 29 Sep, 2006 - 10:37 AM)

clock_t is defined like this in time.h
CODE
typedef long clock_t;
So when you iterate through the loop a lot of times, the time difference will obviously increase.
At one point, the value of the time difference will exceed the range of the long data type.
And that is why the end result is garbage and it makes you feel that the CPU Clock time has reduced.
Dear Friend,
As you wrote "At one point, the value of the time difference will exceed the range of the long data type.
", so I checked it and found that "point" equal to 3,865,470,566 call times. Where it's increased to 3,865,470,567(just one more call time), clock numbers from 3,120,000 comes down to 330,000! These are not just numbers. I can obviously feel it! I see that speed is realy increased!
Anyway calling the SQRT function just once more than before must not lead to over flow of long data type. Because its range is too much more than 3,120,000( it's about 4,000,000,000) and one more call time is not so time consuming.
And there's another problem either! The numbers are not same always! Sometimes it takes 3,120,000, sometimes 3,200,000 and sometimes other numbers! While the program is not changed and I'm running it again and again!
Do have any idea about it?