48 INTEGER(8) MASK16,MASK32,MASKN,IBYTES,IXOR
54 equivalence(irtemp,rtemp(1))
60 DATA mask16/z
'000000000000FFFF'/
61 DATA mask32/z
'00000000FFFFFFFF'/
62 DATA maskn /z
'0000FFFF00000000'/
76 j = iand(mask16,tpack(4))
79 j = iand(mask32,tpack(6))
81 print *,
' W3AI00: ERROR, NO. OF WORDS IN GRID = 0'
85 print *,
' W3AI00: ERROR, NO. OF WORDS IN GRID = ',j
86 print *,
' THERE IS A LIMIT OF 262144 WORDS.'
95 IF (mod(m,4).NE.0)
THEN
106 tpack(5) = ishft(ibytes,48_8)
113 rmax = amax1(rmax,real8(i))
114 rmin = amin1(rmin,real8(i))
117 a = 0.5 * (rmax + rmin)
119 IF (rmax.NE.rmin)
THEN
122 IF (istat.NE.0) print *,
' W3AI00-USDCTI OVERFLOW ERROR 1'
123 n = iand(ishft(ib,-56_8),127_8)
125 IF (btest(ib,55_8))
GO TO 30
127 IF (btest(ib,54_8))
GO TO 30
129 IF (btest(ib,53_8))
GO TO 30
132 n = max(-127_8,min(127_8,n))
144 CALL q9ei32(a,rtemp(2),1,istat)
145 IF (istat.NE.0) print *,
' W3AI00-USDCTI OVERFLOW ERROR 2'
146 tpack(5)=ior(tpack(5),irtemp)
150 tpack(6) = ior(iand(maskn,ishft(n,32_8)),tpack(6))
154 twon = 2.0 ** (15 - n)
156 xx(i) = (real8(i) - a) * twon
157 kk(i) = xx(i) + sign(0.5,xx(i))
158 IF (kk(i).GE.(-32767))
THEN
159 kk(i) = min(32767_8,kk(i))
163 kk(i) = iand(kk(i),mask16)
171 kk(i) = ishft(kk(i), 48_8)
172 kk(i+1) = ishft(kk(i+1),32_8)
173 kk(i+2) = ishft(kk(i+2),16_8)
179 kk(lim+1) = ishft(kk(lim+1),48_8)
183 kk(lim+1) = ishft(kk(lim+1),48_8)
184 kk(lim+2) = ishft(kk(lim+2),32_8)
188 kk(lim+1) = ishft(kk(lim+1),48_8)
189 kk(lim+2) = ishft(kk(lim+2),32_8)
190 kk(lim+3) = ishft(kk(lim+3),16_8)
197 pack(ii) = ior(ior(ior(kk(i),kk(i+1)),kk(i+2)),kk(i+3))
204 pack(iword) = kk(lim+1)
208 pack(iword) = ior(kk(i),kk(i+1))
212 pack(iword) = ior(ior(kk(i),kk(i+1)),kk(i+2))
228 ixor = ieor(ixor,pack(i))
233 ixor = ieor(ishft(ixor,-32_8),iand(ixor,mask32))
237 ixor = ieor(ishft(ixor,-16_8),iand(ixor,mask16))
241 pack(5) = ior(ishft(ixor,32_8),pack(5))
274 INTEGER(4) SIGN,MASKFR,IBIT8,MASKSN,ITEMP,IBMEXP,IBX7
279 DATA maskfr/z
'00FFFFFF'/
280 DATA ibit8 /z
'00800000'/
281 DATA masksn/z
'7FFFFFFF'/
282 DATA sign /z
'80000000'/
300 IF (itemp.EQ.0)
GO TO 20
310 itemp = iand(itemp,masksn)
314 ibmexp = ishft(itemp,-23_4)
318 IF (ibmexp.EQ.255)
GO TO 10
322 IF (ibmexp.EQ.0)
GO TO 20
323 ibmexp = ibmexp + 133
324 ibx7 = iand(3_4,ibmexp)
325 ibmexp = ieor(ibmexp,ibx7)
326 ibx7 = ieor(3_4,ibx7)
327 itemp = ior(itemp,ibit8)
328 itemp = ior(ishft(ibmexp,22_4),ishft(iand(itemp,maskfr),
330 b(i) = ior(itemp,isign)
371 INTEGER(4) SIGN,MASKFR,IBIT8,MASKSN,ITEMP,IEEEXP
372 INTEGER(4) IBMEXP,IBX7,JTEMP,ISIGN
376 DATA maskfr/z
'00FFFFFF'/
377 DATA ibit8 /z
'00800000'/
378 DATA masksn/z
'7FFFFFFF'/
379 DATA sign /z
'80000000'/
394 IF (itemp.EQ.0)
GO TO 20
406 itemp = iand(itemp,masksn)
412 ieeexp = ishft(itemp,-23_4)
416 IF (ieeexp.EQ.255)
GO TO 10
422 IF (ieeexp.EQ.0)
GO TO 20
423 ibmexp = ieeexp + 133
424 ibx7 = iand(3_4,ibmexp)
425 ibmexp = ieor(ibmexp,ibx7)
426 ibx7 = ieor(3_4,ibx7)
427 itemp = ior(itemp,ibit8)
428 jtemp = ior(ishft(ibmexp,22_4),ishft(iand(itemp,maskfr),
430 b(1,i) = ior(jtemp,isign)
432 IF (ibx7.GT.0) b(2,i) = ishft(itemp,32_4-ibx7)