From f37ab2c95709480faceb8756ad52e754a460b466 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 1 Jun 2019 17:02:24 +0200 Subject: make pi global constant --- src/f1.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/f1.f90 b/src/f1.f90 index f8054cd..955be71 100644 --- a/src/f1.f90 +++ b/src/f1.f90 @@ -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) -- cgit v1.2.3