For Programmers: Free Programming Magazines  


Home > Archive > Fortran > March 2006 > powers of five









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author powers of five
robert.corbett@sun.com

2006-03-25, 8:00 am

In an earlier posting, I presented a program for printing
the positive and negative powers of five from 1 to 22.
The limit of 22 was chosen because beyond 22
rounding error caused inaccurate results. The
following program fixes that defect.

PROGRAM MAIN
WRITE (*, '(<I>PF25.0, TL1, '' '', I2, 2X, <-I>PF<I+2>.<I> )')
1 (2.0**(-I), I, 2.0**I, I = 1, 32)
END

Bob Corbett

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com