bit.popcount
code:Lua
r = textmodule.bit.popcount(n1)
モジュール
bit
引数
table:_
変数 型 概要
1 n1 number 数値
返り値
table:_
変数 型 概要
1 r number 計算結果
概要
n1
の立っているビット(1の個数)を取得する。