mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
2c17544f3f
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/WSJT/trunk@1 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
19 lines
422 B
Fortran
19 lines
422 B
Fortran
FUNCTION igray(n,is)
|
|
INTEGER igray,is,n
|
|
INTEGER idiv,ish
|
|
if (is.ge.0) then
|
|
igray=ieor(n,n/2)
|
|
else
|
|
ish=-1
|
|
igray=n
|
|
1 continue
|
|
idiv=ishft(igray,ish)
|
|
igray=ieor(igray,idiv)
|
|
if(idiv.le.1.or.ish.eq.-16)return
|
|
ish=ish+ish
|
|
goto 1
|
|
endif
|
|
return
|
|
END
|
|
C (C) Copr. 1986-92 Numerical Recipes Software *(t9,12.
|