|
real function F(x,y,m,n)
implicit none
real::x,y,pi
integer :: m,n
PI=4.d0*ATAN(1.d0)
F = exp((0.d0,-1.d0)*(2.d0*pi*x/m+2.d0*pi*y/n))
end function
program test
include 'link_fnl_shared.h'
implicit none
real:: F
real, parameter :: ERRABS = 0.001
real, parameter :: ERRREL = 0.001
integer, parameter :: IRULE = 6
real:: G,H
real :: ANS
real :: ERREST
integer :: i,j
real::x1,y1
real :: A,B,k
A = -0.5
B = 0.5
do i=1,10
do j=1,10
k=F(x1,y1,i,j)
call TWODQ (k, A, B, G, H, ERRABS, ERRREL, IRULE, ANS, ERREST)
write(*,*) ANS
end do
end do
end program test
real function G(X)
implicit none
real X
G = -0.5
return
end function
real function H(X)
implicit none
real X
H = 0.5
return
end function
目的是为了求e^-i(2pi*x/n+2pi*y/m)的二重积分,m和n是变的,但是运行会报错
|
|