public static int magnitude(long v){
  return Long.SIZE - Long.numberOfLeadingZeros(v);
}

public static int magnitude ( long v ) { return Long . SIZE - Long . numberOfLeadingZeros ( v ) ; }
the magnitude is the position of the highest bit set
