1
subroutine gdcp2i(n, itab, m)
3
c decomposition of an integer n in a base tw0.
4
c n=a1+a2*2+a3*2**2+.........+am*2**(m-1).
6
c subroutine gdcp2i(n,itab,m)
9
c n : integer to be decomposed (n.le.32767)
11
c itab :logical vector of dimension 15.
12
c in output: if(a(i-1).ne.0)then itab(i)=.true.
13
c else itab(i)=.false.
15
c m :the number of itab elements to be consider in output.
18
c j. hanen -september 1978-ensm-nantes.
24
data ipow2(1), ipow2(2), ipow2(3), ipow2(4), ipow2(5),
25
* ipow2(6), ipow2(7), ipow2(8), ipow2(9), ipow2(10),
26
* ipow2(11), ipow2(12), ipow2(13), ipow2(14), ipow2(15)
27
* /16384,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1/
32
if (nn.gt.32767) nn = mod(nn,32767)
34
if (nn.lt.ipow2(i)) go to 10