1. 判断一个整数是否2的幂 if ((scale & (scale - 1)) != 0) throw new Error("data type scale not a power of two");