6 February 2020 11:29:00.618 AM complex_numbers_test: FORTRAN77 version. Demonstrate complex number usage. TEST01 Declare a COMPLEX variable. Assign value with an = statement. Scalar A: (1.00000000,2.00000000) (1.00000000,2.00000000) 1.00000 2.00000 Vector B: 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 Array C: 1.00000 0.100000 1.00000 0.200000 2.00000 0.100000 2.00000 0.200000 TEST02 Declare a COMPLEX variable. Initialize with a data statement. Scalar A: (1.00000000,2.00000000) (1.00000000,2.00000000) 1.00000 2.00000 Vector B: 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 Array C: 1.00000 0.100000 1.00000 0.200000 2.00000 0.100000 2.00000 0.200000 TEST03 Apply intrinsic functions to COMPLEX variable a = 1.00000 2.00000 - a = -1.00000 -2.00000 a + 3 = 4.00000 2.00000 a + (0,5) = 1.00000 7.00000 4 * a = 4.00000 8.00000 a / 8 = 0.125000 0.250000 a * a = -3.00000 4.00000 a**2 = -3.00000 4.00000 1/a = 0.200000 -0.400000 cabs(a) = 2.23607 ccos(a) = 2.03272 -3.05190 cexp(a) = -1.13120 2.47173 clog(a) = 0.804719 1.10715 cmplx(1) = 1.00000 0.00000 cmplx(2,3) = 2.00000 3.00000 cmplx(4.0) = 4.00000 0.00000 cmplx(5.0,6.0) = 5.00000 6.00000 conjg(a) = 1.00000 -2.00000 csin(a) = 3.16578 1.95960 csqrt(a) = 1.27202 0.786151 imag(a) = 2.00000 int(a) = 1 real(a) = 1.00000 TEST04 Declare a DOUBLE COMPLEX variable. Assign value with an = statement. Scalar A: (1.0000000000000000,2.0000000000000000) (1.0000000000000000,2.0000000000000000) 1.00000 2.00000 Vector B: 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 Array C: 1.00000 0.100000 1.00000 0.200000 2.00000 0.100000 2.00000 0.200000 TEST05 Declare a DOUBLE COMPLEX variable. Initialize with a data statement. Scalar A: (1.0000000000000000,2.0000000000000000) (1.0000000000000000,2.0000000000000000) 1.00000 2.00000 Vector B: 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 Array C: 1.00000 0.100000 1.00000 0.200000 2.00000 0.100000 2.00000 0.200000 TEST06 Apply intrinsic functions to DOUBLE COMPLEX variable a = 1.00000 2.00000 - a = -1.00000 -2.00000 a + 3 = 4.00000 2.00000 a + (0,5) = 1.00000 7.00000 4 * a = 4.00000 8.00000 a / 3 = 0.333333 0.666667 a * a = -3.00000 4.00000 a**2 = -3.00000 4.00000 1/a = 0.200000 -0.400000 cdabs(a) = 2.23607 cdcos(a) = 2.03272 -3.05190 cdexp(a) = -1.13120 2.47173 cdlog(a) = 0.804719 1.10715 dcmplx(1) = 1.00000 0.00000 dcmplx(2,3) = 2.00000 3.00000 dcmplx(4.0) = 4.00000 0.00000 dcmplx(5.0,6.0) = 5.00000 6.00000 dconjg(a) = 1.00000 -2.00000 cdsin(a) = 3.16578 1.95960 cdsqrt(a) = 1.27202 0.786151 dimag(a) = 2.00000 int(a) = 1 dreal(a) = 1.00000 complex_numbers_test: Normal end of execution. 6 February 2020 11:29:00.618 AM