March 20 2006 12:54:23.781 PM DOUBLE_COMPLEX Demonstrate the use of double precision complex arithmetic in FORTRAN90. TEST01 Use complex values of the default type. RANGE provides the decimal exponent range. RANGE(I1) = 37 KIND returns the "kind" of a given integer. Do you expect a value of 4, or of 8? KIND(I1) = 4 A = (1.000000,1.000000) B = sqrt ( A ) = (1.098684,0.4550898) C = A - B * B = (-2.3841858E-07,0.0000000E+00) TEST02 Use complex values of KIND = 8. RANGE provides the decimal exponent range. RANGE(A) = 307 KIND returns the "kind" of a given integer. KIND(A) = 8 A = (1.00000000000000,1.00000000000000) B = sqrt ( A ) = (1.09868411346781,0.455089860562227) C = A - B * B = (-2.220446049250313E-016,0.000000000000000E+000) TEST03 Use "DOUBLE COMPLEX" values. A = (1.00000000000000,1.00000000000000) B = sqrt ( A ) = (1.09868411346781,0.455089860562227) C = A - B * B = (-2.220446049250313E-016,0.000000000000000E+000) DOUBLE_COMPLEX Normal end of execution. March 20 2006 12:54:23.786 PM