On 02/14/2013 04:44 PM, Sparsh Mittal wrote: > Can you please tell, why it is taking DIM as zero? If I reduce DIM, it works > fine. It is strange. 1024 is an int value. Write 1024L instead to ensure that the calculation is performed using long.