CLASSWORK 1 8/31/2006 =========== 1. The wordlength is 32 bits on your classroom PCs. The integer standard is integer*4 (1 Word = 4 Bytes, 1B=8b). Write a short Fortran program to find the largest integer imax. Write out all digits of imax and give a shorter representation. imax = Calculate imax-1 and imax+1 in your Fortran program and write the results down. imax-1 = imax+1 = 2. Find the CPU time needed for some simple applications. Express the result in units of seconds and units of PC clockcycles. Assume that the classroom PCs run at 2GHz. For all measurements use the g77 compiler with and without the -O option. Use the code in double precision (STMC default) and single precision. So you have four results to list for each question. 2.1 One Marsaglia random number. Use 10**8 random numbers for the measurement. 2.2 Simple addition a=a+one. Repeat this at least 10**9 times. 3. Give a rough estimate of the CPU time needed for a run of the program ran_range in ForProg/Marsaglia.