bitLength

bitLength

> 功能

返回表示数字 x* 所需的有效位数,即设置为 1 的最高位的位置加一。当 *x0 时返回 0

对于正数,结果等于 floor(log2(x)) + 1。该函数也适用于大整数。

参数
返回值
Note