Statistics
| Branch: | Revision:

root / synthbench / euroben-dm / mod1h / log2.f @ 0:839f52ef7657

History | View | Annotate | Download (484 Bytes)

1
      Integer Function log2( n )
2
! ---------------------------------------------------------------------
3
      Use                    numerics
4
      Implicit               None
5
      Integer             :: n
6

    
7
      Real(l_), Parameter :: ln2 = 0.6931471805599453_l_
8
! ---------------------------------------------------------------------
9
      log2  = Ceiling( Log( Real( n, l_ ) )/ln2 )
10
! ---------------------------------------------------------------------
11
      End Function log2