<< Chapter < Page Chapter >> Page >

Run the following code to count the number of inverses that are not perfectly accurate:


REAL*4 X,Y,Z INTEGER II = 0 DO X=1.0,1000.0,1.0Y = 1.0 / X Z = Y * XIF ( Z .NE. 1.0 ) THEN I = I + 1ENDIF ENDDOPRINT *,’Found ’,I END

Change the type of the variables to REAL*8 and repeat. Make sure to keep the optimization at a sufficiently low level (-00) to keep the compiler from eliminating the computations.

Write a program to determine the number of digits of precision for REAL*4 and REAL*8 .

Write a program to demonstrate how summing an array forward to backward and backward to forward can yield a different result.

Assuming your compiler supports varying levels of IEEE compliance, take a significant computational code and test its overall performance under the various IEEE compliance options. Do the results of the program change?

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Cómputo de alto rendimiento. OpenStax CNX. Sep 02, 2011 Download for free at http://cnx.org/content/col11356/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Cómputo de alto rendimiento' conversation and receive update notifications?

Ask