log2floor

(函数来自 pyomo.core.kernel.piecewise_library.util)

pyomo.core.kernel.piecewise_library.util.log2floor(n)[source]

计算 floor(log2(n)) 的精确值,而不使用浮点计算。输入参数必须为正整数。