diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-01 17:02:24 +0200 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-01 17:02:24 +0200 |
commit | f37ab2c95709480faceb8756ad52e754a460b466 (patch) | |
tree | 0eeb2686fac37ead182e81b81bbcec633ee2ad5c | |
parent | 0ef69b67e70da34e96cddfca4700ffe0a5e2304f (diff) | |
download | fortran-assignment2-f37ab2c95709480faceb8756ad52e754a460b466.tar.gz fortran-assignment2-f37ab2c95709480faceb8756ad52e754a460b466.zip |
make pi global constant
-rw-r--r-- | src/f1.f90 | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,6 +5,9 @@ PROGRAM test INCLUDE 'fftw3.f03' + real(kind=8), parameter :: pi = acos(-1.0) ! also used from f1() + + ! rest of variables only used from "main" program code integer, parameter :: npoints = 1024, ncomplex = npoints / 2 + 1 real(kind=8), parameter :: start = 0, end = 1 integer :: i @@ -72,7 +75,6 @@ CONTAINS PURE real(kind=8) FUNCTION f1(t) real(kind=8), intent(in) :: t - real(kind=8), parameter :: pi = acos(-1.0) f1 = sin(2 * pi * t * 200) + 2 * sin(2 * pi * t * 400) |