V2EX  ›  英汉词典

Log2

定义 Definition

log2 指“以 2 为底的对数”(二进制对数),常写作 log₂(x) 或在编程/数学排版中写作 **log2(x)**。在计算机科学中常用于描述信息量(比特)、算法复杂度、二叉结构层数等。(也可能在某些编程语言里作为函数名表示“计算以 2 为底的对数”。)

发音 Pronunciation (IPA)

/ˌlɔːɡ ˈtuː/

例句 Examples

log2(8) equals 3.
log2(8) 等于 3。

Because the algorithm halves the input each step, its time complexity is proportional to log2(n).
因为该算法每一步都把输入规模减半,所以它的时间复杂度与 log2(n) 成正比。

词源 Etymology

log 来自 logarithm(对数) 的缩写形式,而 logarithm 源自希腊语成分:logos(比例、计算)+ arithmos(数)。后缀 2 表示“底数为 2”,因此 log2 就是“以 2 为底的对数”。

相关词 Related Words

文学与著作 Literary Works

  • Introduction to Algorithms(《算法导论》)——在分析分治、堆、二叉树高度与复杂度时常出现 log₂(n)。
  • Donald E. Knuth, The Art of Computer Programming(《计算机程序设计艺术》)——在算法分析与信息相关章节中频繁使用以 2 为底的对数。
  • Ronald L. Graham, Donald E. Knuth, Oren Patashnik, Concrete Mathematics(《具体数学》)——在离散数学推导与渐近分析中常见 log₂。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1192 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 16:32 · PVG 00:32 · LAX 08:32 · JFK 11:32
♥ Do have faith in what you're doing.