Newbie question about double precision

From: Blue Cat (bluecat22_at_go.com)
Date: 12/03/03


Date: Wed, 3 Dec 2003 09:47:12 -0500

I just bought the F compiler from the Fortran Company, and I'm having a
problem with double precision. Below is the code of a simple program:

program circumf
     integer, parameter :: dbl_prec = 2
    real (kind=dbl_prec), parameter :: pi = 3.141592653589793
    real (kind=dbl_prec) :: r, c
    print *, "Input the radius"
    read *, r
    c = 2 * pi * r
    print *, "pi = ", pi
    print *, "circumference = ", c
end program circumf

This program prints out incorrect values for pi and c. (pi =
3.1415927410125732)