!
! Return the value of NaN
! Single Precision
      REAL(4) S_NAN
      INTEGER(4) J_NAN
      EQUIVALENCE (J_NAN,S_NAN)
      REAL(4) S_PINF
      INTEGER(4) J_PINF
      EQUIVALENCE (J_PINF,S_PINF)
      REAL(4) S_MINF
      INTEGER(4) J_MINF
      EQUIVALENCE (J_MINF,S_MINF)
!
! Double Precision constant
      REAL(8) :: D_NAN
      INTEGER(4) :: I_NAN(2)
      EQUIVALENCE (I_NAN,D_NAN)
      REAL(8) :: D_PINF
      INTEGER(4) :: I_PINF(2)
      EQUIVALENCE (I_PINF,D_PINF)
      REAL(8) :: D_MINF
      INTEGER(4) :: I_MINF(2)
      EQUIVALENCE (I_MINF,D_MINF)
#if defined(EEEI)
! Working
      DATA J_NAN  /Z'7FA00000'/
      DATA J_PINF /Z'7F800000'/
      DATA J_MINF /Z'FF800000'/
      DATA I_NAN  /Z'7FF40000',0/
      DATA I_PINF /Z'7FF00000',0/
      DATA I_MINF /Z'FFF00000',0/
#endif
#if defined(IEEE)
! Working
      DATA J_NAN  /Z'FFC00000'/
      DATA J_PINF /Z'7F800000'/
      DATA J_MINF /Z'FF800000'/
      DATA I_NAN  /0,Z'7FF40000'/
      DATA I_PINF /0,Z'7FF00000'/
      DATA I_MINF /0,Z'FFF00000'/
#endif
#if defined(VAX)
      DATA S_NAN /-1E38/            ! Not supported by VAX, so arbitrary
      DATA D_NAN /-1D38/            ! Not supported by VAX, so arbitrary
      DATA D_PINF /1D38/
      DATA D_MINF /-1D38/
#endif
   
