aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/f1.f9012
1 files changed, 6 insertions, 6 deletions
diff --git a/src/f1.f90 b/src/f1.f90
index b1f89b9..f8054cd 100644
--- a/src/f1.f90
+++ b/src/f1.f90
@@ -6,9 +6,9 @@ PROGRAM test
INCLUDE 'fftw3.f03'
integer, parameter :: npoints = 1024, ncomplex = npoints / 2 + 1
- real(C_DOUBLE), parameter :: start = 0, end = 1
+ real(kind=8), parameter :: start = 0, end = 1
integer :: i
- real(C_DOUBLE) :: t, &
+ real(kind=8) :: t, &
delta = (end - start) / real(npoints - 1, C_DOUBLE)
type(C_PTR) :: p_real, p_complex, plan
@@ -51,7 +51,7 @@ PROGRAM test
DO i = 1, npoints
t = (i - 1) * delta + start
- arr_real(i) = f1(t)
+ arr_real(i) = real(f1(t), C_DOUBLE)
! write(*,*) t, " ", arr_real(i)
@@ -70,9 +70,9 @@ PROGRAM test
CONTAINS
- PURE real(C_DOUBLE) FUNCTION f1(t)
- real(C_DOUBLE), intent(in) :: t
- real(C_DOUBLE), parameter :: pi = acos(-1.0)
+ 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)