Anonymous user
Arithmetic/Complex: Difference between revisions
m
→{{header|Fortran}}
Line 217:
INTEGER, PARAMETER :: N = 50
INTEGER :: J
COMPLEX, DIMENSION(0:N-1) ::
ABDIFF = A - B
Line 224:
AREAL = REAL(A) ! Real part
AIMAG = IMAG(A) ! Imaginary part
ANORM = ABS(A) ! Complex norm (or "modulus" or "absolute value") (use CABS before Fortran 90)
ACONJ = CONJG(A) ! Complex conjugate (same as REAL(A) -
!
! useful for FFT calculations, among other things
END PROGRAM CDEMO2
|