Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove intmath.f #399

Open
edwardhartnett opened this issue May 16, 2023 · 0 comments
Open

remove intmath.f #399

edwardhartnett opened this issue May 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Contributor

We have intmath.f, but it is only ever used once:

find . -name '*'|xargs grep -s -i ilog2
./simpack.f:           temp=ilog2(nint(real(maxnum)/(rmax-rmin)))
./intmath.f:!> - ilog2 Calculate log(x)/log(2).
./intmath.f:!>   - ilog2_8 for 8 bit integer numbers.
./intmath.f:!>   - ilog2_4 for 4 bit integer numbers.
./intmath.f:!>   - ilog2_2 for 2 bit integer numbers.
./intmath.f:!>   - ilog2_1 for 1 bit integer numbers.
./intmath.f:      interface ilog2 
./intmath.f:      module procedure ilog2_8 
./intmath.f:      module procedure ilog2_4
./intmath.f:      module procedure ilog2_2
./intmath.f:      module procedure ilog2_1
./intmath.f:      end interface ilog2
./intmath.f:         i1log2_8=ilog2_8(ival)
./intmath.f:         i1log2_8=ilog2_8(ival+one)
./intmath.f:         i1log2_4=ilog2_4(ival)
./intmath.f:         i1log2_4=ilog2_4(ival+one)
./intmath.f:         i1log2_2=ilog2_2(ival)
./intmath.f:         i1log2_2=ilog2_2(ival+one)
./intmath.f:         i1log2_1=ilog2_1(ival)
./intmath.f:         i1log2_1=ilog2_1(ival+one)
./intmath.f:      function ilog2_8(i_in)
./intmath.f:      integer(kind=8)::ilog2_8,i
./intmath.f:      ilog2_8=0
./intmath.f:         ilog2_8=1
./intmath.f:         ilog2_8=ilog2_8+32
./intmath.f:         !write(0,*) 'iand ffffffff',i,ilog2_8
./intmath.f:         ilog2_8=ilog2_8+16
./intmath.f:         !write(0,*) 'iand ffff' ,i,ilog2_8
./intmath.f:         ilog2_8=ilog2_8+8
./intmath.f:         !write(0,*) 'iand ff',i,ilog2_8
./intmath.f:         ilog2_8=ilog2_8+4
./intmath.f:         !write(0,*) 'iand f',i,ilog2_8
./intmath.f:         ilog2_8=ilog2_8+2
./intmath.f:         !write(0,*) 'iand c',i,ilog2_8
./intmath.f:         ilog2_8=ilog2_8+1
./intmath.f:         !write(0,*) 'iand 2',i,ilog2_8
./intmath.f:      end function ilog2_8
./intmath.f:      function ilog2_4(i_in)
./intmath.f:      integer(kind=4)::ilog2_4,i
./intmath.f:      ilog2_4=0
./intmath.f:         ilog2_4=1
./intmath.f:         ilog2_4=ilog2_4+16
./intmath.f:         !write(0,*) 'iand ffff' ,i,ilog2_4
./intmath.f:         ilog2_4=ilog2_4+8
./intmath.f:         !write(0,*) 'iand ff',i,ilog2_4
./intmath.f:         ilog2_4=ilog2_4+4
./intmath.f:         !write(0,*) 'iand f',i,ilog2_4
./intmath.f:         ilog2_4=ilog2_4+2
./intmath.f:         !write(0,*) 'iand c',i,ilog2_4
./intmath.f:         ilog2_4=ilog2_4+1
./intmath.f:         !write(0,*) 'iand 2',i,ilog2_4
./intmath.f:      end function ilog2_4
./intmath.f:      function ilog2_2(i_in)
./intmath.f:      integer(kind=2)::ilog2_2,i
./intmath.f:      ilog2_2=0
./intmath.f:         ilog2_2=1
./intmath.f:         ilog2_2=ilog2_2+8
./intmath.f:         !write(0,*) 'iand ff',i,ilog2_2
./intmath.f:         ilog2_2=ilog2_2+4
./intmath.f:         !write(0,*) 'iand f',i,ilog2_2
./intmath.f:         ilog2_2=ilog2_2+2
./intmath.f:         !write(0,*) 'iand c',i,ilog2_2
./intmath.f:         ilog2_2=ilog2_2+1
./intmath.f:         !write(0,*) 'iand 2',i,ilog2_2
./intmath.f:      end function ilog2_2
./intmath.f:      function ilog2_1(i_in)
./intmath.f:      integer(kind=1)::ilog2_1,i
./intmath.f:      ilog2_1=0
./intmath.f:         ilog2_1=1
./intmath.f:         ilog2_1=ilog2_1+4
./intmath.f:         !write(0,*) 'iand f',i,ilog2_1
./intmath.f:         ilog2_1=ilog2_1+2
./intmath.f:         !write(0,*) 'iand c',i,ilog2_1
./intmath.f:         ilog2_1=ilog2_1+1
./intmath.f:         !write(0,*) 'iand 2',i,ilog2_1
./intmath.f:      end function ilog2_1
ed@koko:~/NCEPLIBS-g2/src$ 
@edwardhartnett edwardhartnett added the enhancement New feature or request label May 16, 2023
@edwardhartnett edwardhartnett self-assigned this May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant