Answer

Whereas the original used REAL variables, this one uses DOUBLE PRECISION variables. This essentially tells Fortran to use more memory for each variable, meaning that more precision can be maintained.

The original called the intrinsic function ``REAL'' to convert ``I'' and ``I-1'' into REAL values. This one calls the intrinsic function ``DBLE'' to convert them into DOUBLE PRECISION values.

Finally, the altered version uses a different FORMAT statement, since there are more significant digits to print out.

Return to lesson.



Hamlet Project
hamlet@cs.utah.edu