52 parameter( nnan = 3, ninf = 5 )
53 double complex czero, cone
54 parameter( czero = dcmplx( 0.0d0, 0.0d0 ),
55 $ cone = dcmplx( 1.0d0, 0.0d0 ) )
59 double precision ainf, anan, ov
60 double complex y, r, cinf( ninf ), cnan( nnan )
63 intrinsic huge, dcmplx
69 cinf(1) = dcmplx( ainf, 0.0d0 )
70 cinf(2) = dcmplx(-ainf, 0.0d0 )
71 cinf(3) = dcmplx( 0.0d0, ainf )
72 cinf(4) = dcmplx( 0.0d0,-ainf )
73 cinf(5) = dcmplx( ainf, ainf )
77 cnan(1) = dcmplx( anan, 0.0d0 )
78 cnan(2) = dcmplx( 0.0d0, anan )
79 cnan(3) = dcmplx( anan, anan )
89 WRITE( *, fmt = 9998 )
'ia',i, czero, y, r,
'NaN' 92 if( (r .ne. y) .and. (r .eq. r) )
then 93 WRITE( *, fmt = 9998 )
'ib',i, cone, y, r,
97 if( (i.eq.1) .or. (i.eq.2) )
then 98 if( (r .ne. cinf(1)) .and. (r .eq. r) )
then 99 WRITE( *, fmt = 9998 )
'ic',i, y, y, r,
'Inf and NaN' 101 else if( (i.eq.3) .or. (i.eq.4) )
then 102 if( (r .ne. cinf(2)) .and. (r .eq. r) )
then 103 WRITE( *, fmt = 9998 )
'ic',i, y, y, r,
'-Inf and NaN' 107 WRITE( *, fmt = 9998 )
'ic',i, y, y, r,
'NaN' 117 WRITE( *, fmt = 9998 )
'na',i, czero, y, r,
'NaN' 121 WRITE( *, fmt = 9998 )
'nb',i, cone, y, r,
'NaN' 125 WRITE( *, fmt = 9998 )
'nc',i, y, y, r,
'NaN' 130 9998
FORMAT(
'[',a2,i1,
'] (', (es24.16e3,sp,es24.16e3,
"*I"),
') * (',
131 $ (es24.16e3,sp,es24.16e3,
"*I"),
') = (',
132 $ (es24.16e3,sp,es24.16e3,
"*I"),
') differs from ', a17 )