Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable kind #17

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cfftb1.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE CFFTB1 (N,C,CH,WA,IFAC)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION CH(*) ,C(*) ,WA(*) ,IFAC(*)
NF = IFAC(2)
NA = 0
Expand Down
3 changes: 2 additions & 1 deletion src/cfftf1.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE CFFTF1 (N,C,CH,WA,IFAC)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION CH(*) ,C(*) ,WA(*) ,IFAC(*)
NF = IFAC(2)
NA = 0
Expand Down
7 changes: 4 additions & 3 deletions src/cffti1.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE CFFTI1 (N,WA,IFAC)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WA(*) ,IFAC(*) ,NTRYH(4)
DATA NTRYH(1),NTRYH(2),NTRYH(3),NTRYH(4)/3,4,2,5/
NL = N
Expand Down Expand Up @@ -27,7 +28,7 @@ SUBROUTINE CFFTI1 (N,WA,IFAC)
IFAC(1) = N
IFAC(2) = NF
TPI = 6.28318530717958647692D0
ARGH = TPI/FLOAT(N)
ARGH = TPI/REAL(N,RK)
I = 2
L1 = 1
DO 110 K1=1,NF
Expand All @@ -43,7 +44,7 @@ SUBROUTINE CFFTI1 (N,WA,IFAC)
WA(I) = 0.0D0
LD = LD+L1
FI = 0.0D0
ARGLD = FLOAT(LD)*ARGH
ARGLD = REAL(LD,RK)*ARGH
DO 108 II=4,IDOT,2
I = I+2
FI = FI+1.D0
Expand Down
3 changes: 2 additions & 1 deletion src/cosqb1.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE COSQB1 (N,X,W,XH)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(1) ,W(1) ,XH(1)
NS2 = (N+1)/2
NP2 = N+2
Expand Down
3 changes: 2 additions & 1 deletion src/cosqf1.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE COSQF1 (N,X,W,XH)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(1) ,W(1) ,XH(1)
NS2 = (N+1)/2
NP2 = N+2
Expand Down
3 changes: 2 additions & 1 deletion src/dcosqb.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DCOSQB (N,X,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(*) ,WSAVE(*)
DATA TSQRT2 /2.82842712474619009760D0/
IF (N-2) 101,102,103
Expand Down
3 changes: 2 additions & 1 deletion src/dcosqf.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DCOSQF (N,X,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(*) ,WSAVE(*)
DATA SQRT2 /1.41421356237309504880D0/
IF (N-2) 102,101,103
Expand Down
5 changes: 3 additions & 2 deletions src/dcosqi.f
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
SUBROUTINE DCOSQI (N,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WSAVE(1)
DATA PIH /1.57079632679489661923D0/
DT = PIH/FLOAT(N)
DT = PIH/REAL(N,RK)
FK = 0.0D0
DO 101 K=1,N
FK = FK+1.0D0
Expand Down
3 changes: 2 additions & 1 deletion src/dcost.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DCOST (N,X,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(*) ,WSAVE(*)
NM1 = N-1
NP1 = N+1
Expand Down
5 changes: 3 additions & 2 deletions src/dcosti.f
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
SUBROUTINE DCOSTI (N,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WSAVE(1)
DATA PI /3.14159265358979323846D0/
IF (N .LE. 3) RETURN
NM1 = N-1
NP1 = N+1
NS2 = N/2
DT = PI/FLOAT(NM1)
DT = PI/REAL(NM1,RK)
FK = 0.0D0
DO 101 K=2,NS2
KC = NP1-K
Expand Down
3 changes: 2 additions & 1 deletion src/dfftb.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DFFTB (N,R,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION R(1) ,WSAVE(1)
IF (N .EQ. 1) RETURN
CALL RFFTB1 (N,R,WSAVE,WSAVE(N+1),WSAVE(2*N+1))
Expand Down
3 changes: 2 additions & 1 deletion src/dfftf.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DFFTF (N,R,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION R(1) ,WSAVE(1)
IF (N .EQ. 1) RETURN
CALL RFFTF1 (N,R,WSAVE,WSAVE(N+1),WSAVE(2*N+1))
Expand Down
3 changes: 2 additions & 1 deletion src/dffti.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DFFTI (N,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WSAVE(1)
IF (N .EQ. 1) RETURN
CALL RFFTI1 (N,WSAVE(N+1),WSAVE(2*N+1))
Expand Down
3 changes: 2 additions & 1 deletion src/dsinqb.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DSINQB (N,X,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(1) ,WSAVE(1)
IF (N .GT. 1) GO TO 101
X(1) = 4.0D0*X(1)
Expand Down
3 changes: 2 additions & 1 deletion src/dsinqf.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DSINQF (N,X,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(1) ,WSAVE(1)
IF (N .EQ. 1) RETURN
NS2 = N/2
Expand Down
3 changes: 2 additions & 1 deletion src/dsinqi.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DSINQI (N,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WSAVE(1)
CALL DCOSQI (N,WSAVE)
RETURN
Expand Down
3 changes: 2 additions & 1 deletion src/dsint.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DSINT (N,X,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION X(1) ,WSAVE(1)
NP1 = N+1
IW1 = N/2+1
Expand Down
5 changes: 3 additions & 2 deletions src/dsinti.f
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
SUBROUTINE DSINTI (N,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WSAVE(1)
DATA PI /3.14159265358979323846D0/
IF (N .LE. 1) RETURN
NS2 = N/2
NP1 = N+1
DT = PI/FLOAT(NP1)
DT = PI/REAL(NP1,RK)
DO 101 K=1,NS2
WSAVE(K) = 2.0D0*SIN(K*DT)
101 CONTINUE
Expand Down
3 changes: 2 additions & 1 deletion src/dzfftb.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DZFFTB (N,R,AZERO,A,B,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION R(*) ,A(*) ,B(*) ,WSAVE(*)
IF (N-2) 101,102,103
101 R(1) = AZERO
Expand Down
5 changes: 3 additions & 2 deletions src/dzfftf.f
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
SUBROUTINE DZFFTF (N,R,AZERO,A,B,WSAVE)
USE fftpack_kind
C
C VERSION 3 JUNE 1979
C
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION R(*) ,A(*) ,B(*) ,WSAVE(*)
IF (N-2) 101,102,103
101 AZERO = R(1)
Expand All @@ -14,7 +15,7 @@ SUBROUTINE DZFFTF (N,R,AZERO,A,B,WSAVE)
WSAVE(I) = R(I)
104 CONTINUE
CALL DFFTF (N,WSAVE,WSAVE(N+1))
CF = 2.0D0/FLOAT(N)
CF = 2.0D0/REAL(N,RK)
CFM = -CF
AZERO = 0.5D0*CF*WSAVE(1)
NS2 = (N+1)/2
Expand Down
3 changes: 2 additions & 1 deletion src/dzffti.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE DZFFTI (N,WSAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WSAVE(1)
IF (N .EQ. 1) RETURN
CALL EZFFT1 (N,WSAVE(2*N+1),WSAVE(3*N+1))
Expand Down
7 changes: 4 additions & 3 deletions src/ezfft1.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBROUTINE EZFFT1 (N,WA,IFAC)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
USE fftpack_kind
IMPLICIT REAL(RK) (A-H,O-Z)
DIMENSION WA(*) ,IFAC(*) ,NTRYH(4)
DATA NTRYH(1),NTRYH(2),NTRYH(3),NTRYH(4)/4,2,3,5/
1 ,TPI/6.28318530717958647692D0/
Expand Down Expand Up @@ -27,7 +28,7 @@ SUBROUTINE EZFFT1 (N,WA,IFAC)
107 IF (NL .NE. 1) GO TO 104
IFAC(1) = N
IFAC(2) = NF
ARGH = TPI/FLOAT(N)
ARGH = TPI/REAL(N,RK)
IS = 0
NFM1 = NF-1
L1 = 1
Expand All @@ -37,7 +38,7 @@ SUBROUTINE EZFFT1 (N,WA,IFAC)
L2 = L1*IP
IDO = N/L2
IPM = IP-1
ARG1 = FLOAT(L1)*ARGH
ARG1 = REAL(L1,RK)*ARGH
CH1 = 1.0D0
SH1 = 0.0D0
DCH1 = COS(ARG1)
Expand Down
Loading