Log2

From TD Xenharmonic Wiki
Jump to navigation Jump to search

The symbols log2, lb or ld are used for the binary logarithm, also called dual logarithm.

Log2 of the first primes[edit]

prime log2 prime
2 1
3 1.5849625007212
5 2.3219280948874
7 2.8073549220576
11 3.4594316186373
13 3.7004397181411
17 4.0874628412503
19 4.2479275134436
23 4.523561956057
29 4.8579809951276
31 4.9541963103869

You can calculate the binary logarithm of n like this

log2(n) = ln(n)/ln(2)

Which works in MediaWiki: 1200*log2(5/4) ─→ {{#expr: 1200*(ln(5/4)/ln(2))}} ─→ 386.31371386483