public static int CeilingLogBaseTwo(Int128 a) { return(IntegerMath.IsPowerOfTwo(a) ? a.GetBitLength() - 1 : a.GetBitLength()); }
public static int FloorLogBaseTwo(Int128 a) { return(a.GetBitLength() - 1); }