32 SUBROUTINE getbit(IBM,IBS,IDS,LEN,MG,G,GROUND,GMIN,GMAX,NBIT)
33 dimension mg(len),g(len),ground(len)
38 ground(1)=nint(g(1)*s)/s
42 ground(i)=nint(g(i)*s)/s
43 gmax=max(gmax,ground(i))
44 gmin=min(gmin,ground(i))
48 dowhile(i1.LE.len.AND.mg(i1).EQ.0)
55 ground(i1)=nint(g(i1)*s)/s
60 ground(i)=nint(g(i)*s)/s
61 gmax=max(gmax,ground(i))
62 gmin=min(gmin,ground(i))
77 nbit=log((gmax-gmin)*s+0.9)/log(2.)+1.
subroutine getbit(ibm, ibs, ids, len, mg, g, ground, gmin, gmax, nbit)
The number of bits required to pack a given field.