%N nextpow2 %F $MIR/src/subs/nextpow2.for
%D Find the next power of two greater than or equal to n.
%P mchw
%: numbers, mathematics
%B
      integer function nextpow2 (n)

      integer n

  Input:
    n          Number of interest.

  Output:
    nextpow2   Next power of 2 greater than or equal to n.
