Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program furie
- implicit none
- integer, parameter :: mp = 4
- integer :: n, i, k
- complex(mp) :: w
- complex(mp), allocatable, dimension(:) :: X, Y
- open(1, file = 'input1')
- read(1,*) n
- allocate ( X(0:n-1), Y(0:n-1) )
- read(1,*) X
- w = exp( (0.0,1.0)*8*atan(1.0)/n)
- do k = 0, n-1
- Y(k) = 0
- do i = 0, n-1
- Y(k) = Y(k) + X(i)*w**(-k*i)
- end do
- end do
- open(2, file = 'input2')
- write(2,*) Y
- do i = 0, n-1
- X(i) = 0
- do k = 0, n-1
- X(i) = X(i) + (Y(k)*(w**(k*i)))/n
- end do
- end do
- open(3, file = 'output')
- write(3,*) X
- close(1); close(2); close(3)
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement