fbpx
Wikipedia

Binary logarithm

In mathematics, the binary logarithm (log2n) is the power to which the number 2 must be raised to obtain the value n. That is, for any real number x,

Graph of log2x as a function of a positive real number x

For example, the binary logarithm of 1 is 0, the binary logarithm of 2 is 1, the binary logarithm of 4 is 2, and the binary logarithm of 32 is 5.

The binary logarithm is the logarithm to the base 2 and is the inverse function of the power of two function. As well as log2, an alternative notation for the binary logarithm is lb (the notation preferred by ISO 31-11 and ISO 80000-2).

Historically, the first application of binary logarithms was in music theory, by Leonhard Euler: the binary logarithm of a frequency ratio of two musical tones gives the number of octaves by which the tones differ. Binary logarithms can be used to calculate the length of the representation of a number in the binary numeral system, or the number of bits needed to encode a message in information theory. In computer science, they count the number of steps needed for binary search and related algorithms. Other areas in which the binary logarithm is frequently used include combinatorics, bioinformatics, the design of sports tournaments, and photography.

Binary logarithms are included in the standard C mathematical functions and other mathematical software packages.

History edit

 
Leonhard Euler was the first to apply binary logarithms to music theory, in 1739.

The powers of two have been known since antiquity; for instance, they appear in Euclid's Elements, Props. IX.32 (on the factorization of powers of two) and IX.36 (half of the Euclid–Euler theorem, on the structure of even perfect numbers). And the binary logarithm of a power of two is just its position in the ordered sequence of powers of two. On this basis, Michael Stifel has been credited with publishing the first known table of binary logarithms in 1544. His book Arithmetica Integra contains several tables that show the integers with their corresponding powers of two. Reversing the rows of these tables allow them to be interpreted as tables of binary logarithms.[1][2]

Earlier than Stifel, the 8th century Jain mathematician Virasena is credited with a precursor to the binary logarithm. Virasena's concept of ardhacheda has been defined as the number of times a given number can be divided evenly by two. This definition gives rise to a function that coincides with the binary logarithm on the powers of two,[3] but it is different for other integers, giving the 2-adic order rather than the logarithm.[4]

The modern form of a binary logarithm, applying to any number (not just powers of two) was considered explicitly by Leonhard Euler in 1739. Euler established the application of binary logarithms to music theory, long before their applications in information theory and computer science became known. As part of his work in this area, Euler published a table of binary logarithms of the integers from 1 to 8, to seven decimal digits of accuracy.[5][6]

Definition and properties edit

The binary logarithm function may be defined as the inverse function to the power of two function, which is a strictly increasing function over the positive real numbers and therefore has a unique inverse.[7] Alternatively, it may be defined as ln n/ln 2, where ln is the natural logarithm, defined in any of its standard ways. Using the complex logarithm in this definition allows the binary logarithm to be extended to the complex numbers.[8]

As with other logarithms, the binary logarithm obeys the following equations, which can be used to simplify formulas that combine binary logarithms with multiplication or exponentiation:[9]

 
 
 

For more, see list of logarithmic identities.

Notation edit

In mathematics, the binary logarithm of a number n is often written as log2n.[10] However, several other notations for this function have been used or proposed, especially in application areas.

Some authors write the binary logarithm as lg n,[11][12] the notation listed in The Chicago Manual of Style.[13] Donald Knuth credits this notation to a suggestion of Edward Reingold,[14] but its use in both information theory and computer science dates to before Reingold was active.[15][16] The binary logarithm has also been written as log n with a prior statement that the default base for the logarithm is 2.[17][18][19] Another notation that is often used for the same function (especially in the German scientific literature) is ld n,[20][21][22] from Latin logarithmus dualis[20] or logarithmus dyadis.[20] The DIN 1302 [de], ISO 31-11 and ISO 80000-2 standards recommend yet another notation, lb n. According to these standards, lg n should not be used for the binary logarithm, as it is instead reserved for the common logarithm log10 n.[23][24][25]

Applications edit

Information theory edit

The number of digits (bits) in the binary representation of a positive integer n is the integral part of 1 + log2n, i.e.[12]

 

In information theory, the definition of the amount of self-information and information entropy is often expressed with the binary logarithm, corresponding to making the bit the fundamental unit of information. With these units, the Shannon–Hartley theorem expresses the information capacity of a channel as the binary logarithm of its signal-to-noise ratio, plus one. However, the natural logarithm and the nat are also used in alternative notations for these definitions.[26]

Combinatorics edit

 
A 16-player single elimination tournament bracket with the structure of a complete binary tree. The height of the tree (number of rounds of the tournament) is the binary logarithm of the number of players, rounded up to an integer.

Although the natural logarithm is more important than the binary logarithm in many areas of pure mathematics such as number theory and mathematical analysis,[27] the binary logarithm has several applications in combinatorics:

  • Every binary tree with n leaves has height at least log2n, with equality when n is a power of two and the tree is a complete binary tree.[28] Relatedly, the Strahler number of a river system with n tributary streams is at most log2n + 1.[29]
  • Every family of sets with n different sets has at least log2n elements in its union, with equality when the family is a power set.[30]
  • Every partial cube with n vertices has isometric dimension at least log2n, and has at most 1/2 n log2n edges, with equality when the partial cube is a hypercube graph.[31]
  • According to Ramsey's theorem, every n-vertex undirected graph has either a clique or an independent set of size logarithmic in n. The precise size that can be guaranteed is not known, but the best bounds known on its size involve binary logarithms. In particular, all graphs have a clique or independent set of size at least 1/2 log2n (1 − o(1)) and almost all graphs do not have a clique or independent set of size larger than 2 log2n (1 + o(1)).[32]
  • From a mathematical analysis of the Gilbert–Shannon–Reeds model of random shuffles, one can show that the number of times one needs to shuffle an n-card deck of cards, using riffle shuffles, to get a distribution on permutations that is close to uniformly random, is approximately 3/2 log2n. This calculation forms the basis for a recommendation that 52-card decks should be shuffled seven times.[33]

Computational complexity edit

 
Binary search in a sorted array, an algorithm whose time complexity involves binary logarithms

The binary logarithm also frequently appears in the analysis of algorithms,[19] not only because of the frequent use of binary number arithmetic in algorithms, but also because binary logarithms occur in the analysis of algorithms based on two-way branching.[14] If a problem initially has n choices for its solution, and each iteration of the algorithm reduces the number of choices by a factor of two, then the number of iterations needed to select a single choice is again the integral part of log2n. This idea is used in the analysis of several algorithms and data structures. For example, in binary search, the size of the problem to be solved is halved with each iteration, and therefore roughly log2n iterations are needed to obtain a solution for a problem of size n.[34] Similarly, a perfectly balanced binary search tree containing n elements has height log2(n + 1) − 1.[35]

The running time of an algorithm is usually expressed in big O notation, which is used to simplify expressions by omitting their constant factors and lower-order terms. Because logarithms in different bases differ from each other only by a constant factor, algorithms that run in O(log2n) time can also be said to run in, say, O(log13 n) time. The base of the logarithm in expressions such as O(log n) or O(n log n) is therefore not important and can be omitted.[11][36] However, for logarithms that appear in the exponent of a time bound, the base of the logarithm cannot be omitted. For example, O(2log2n) is not the same as O(2ln n) because the former is equal to O(n) and the latter to O(n0.6931...).

Algorithms with running time O(n log n) are sometimes called linearithmic.[37] Some examples of algorithms with running time O(log n) or O(n log n) are:

Binary logarithms also occur in the exponents of the time bounds for some divide and conquer algorithms, such as the Karatsuba algorithm for multiplying n-bit numbers in time O(nlog2 3),[42] and the Strassen algorithm for multiplying n × n matrices in time O(nlog2 7).[43] The occurrence of binary logarithms in these running times can be explained by reference to the master theorem for divide-and-conquer recurrences.

Bioinformatics edit

 
A microarray for approximately 8700 genes. The expression rates of these genes are compared using binary logarithms.

In bioinformatics, microarrays are used to measure how strongly different genes are expressed in a sample of biological material. Different rates of expression of a gene are often compared by using the binary logarithm of the ratio of expression rates: the log ratio of two expression rates is defined as the binary logarithm of the ratio of the two rates. Binary logarithms allow for a convenient comparison of expression rates: a doubled expression rate can be described by a log ratio of 1, a halved expression rate can be described by a log ratio of −1, and an unchanged expression rate can be described by a log ratio of zero, for instance.[44]

Data points obtained in this way are often visualized as a scatterplot in which one or both of the coordinate axes are binary logarithms of intensity ratios, or in visualizations such as the MA plot and RA plot that rotate and scale these log ratio scatterplots.[45]

Music theory edit

In music theory, the interval or perceptual difference between two tones is determined by the ratio of their frequencies. Intervals coming from rational number ratios with small numerators and denominators are perceived as particularly euphonious. The simplest and most important of these intervals is the octave, a frequency ratio of 2:1. The number of octaves by which two tones differ is the binary logarithm of their frequency ratio.[46]

To study tuning systems and other aspects of music theory that require finer distinctions between tones, it is helpful to have a measure of the size of an interval that is finer than an octave and is additive (as logarithms are) rather than multiplicative (as frequency ratios are). That is, if tones x, y, and z form a rising sequence of tones, then the measure of the interval from x to y plus the measure of the interval from y to z should equal the measure of the interval from x to z. Such a measure is given by the cent, which divides the octave into 1200 equal intervals (12 semitones of 100 cents each). Mathematically, given tones with frequencies f1 and f2, the number of cents in the interval from f1 to f2 is[46]

 

The millioctave is defined in the same way, but with a multiplier of 1000 instead of 1200.[47]

Sports scheduling edit

In competitive games and sports involving two players or teams in each game or match, the binary logarithm indicates the number of rounds necessary in a single-elimination tournament required to determine a winner. For example, a tournament of 4 players requires log2 4 = 2 rounds to determine the winner, a tournament of 32 teams requires log2 32 = 5 rounds, etc. In this case, for n players/teams where n is not a power of 2, log2n is rounded up since it is necessary to have at least one round in which not all remaining competitors play. For example, log2 6 is approximately 2.585, which rounds up to 3, indicating that a tournament of 6 teams requires 3 rounds (either two teams sit out the first round, or one team sits out the second round). The same number of rounds is also necessary to determine a clear winner in a Swiss-system tournament.[48]

Photography edit

In photography, exposure values are measured in terms of the binary logarithm of the amount of light reaching the film or sensor, in accordance with the Weber–Fechner law describing a logarithmic response of the human visual system to light. A single stop of exposure is one unit on a base-2 logarithmic scale.[49][50] More precisely, the exposure value of a photograph is defined as

 

where N is the f-number measuring the aperture of the lens during the exposure, and t is the number of seconds of exposure.[51]

Binary logarithms (expressed as stops) are also used in densitometry, to express the dynamic range of light-sensitive materials or digital sensors.[52]

Calculation edit

 
HP-35 scientific calculator (1972). The log and ln keys are in the top row; there is no log2 key.

Conversion from other bases edit

An easy way to calculate log2n on calculators that do not have a log2 function is to use the natural logarithm (ln) or the common logarithm (log or log10) functions, which are found on most scientific calculators. To change the logarithm base from e or 10 to 2 one can use the formulae:[50][53]

 

or approximately

 

Integer rounding edit

The binary logarithm can be made into a function from integers and to integers by rounding it up or down. These two forms of integer binary logarithm are related by this formula:

 [54]

The definition can be extended by defining  . Extended in this way, this function is related to the number of leading zeros of the 32-bit unsigned binary representation of x, nlz(x).

 [54]

The integer binary logarithm can be interpreted as the zero-based index of the most significant 1 bit in the input. In this sense it is the complement of the find first set operation, which finds the index of the least significant 1 bit. Many hardware platforms include support for finding the number of leading zeros, or equivalent operations, which can be used to quickly find the binary logarithm. The fls and flsl functions in the Linux kernel[55] and in some versions of the libc software library also compute the binary logarithm (rounded up to an integer, plus one).

Iterative approximation edit

For a general positive real number, the binary logarithm may be computed in two parts.[56] First, one computes the integer part,   (called the characteristic of the logarithm). This reduces the problem to one where the argument of the logarithm is in a restricted range, the interval [1, 2), simplifying the second step of computing the fractional part (the mantissa of the logarithm). For any x > 0, there exists a unique integer n such that 2nx < 2n+1, or equivalently 1 ≤ 2nx < 2. Now the integer part of the logarithm is simply n, and the fractional part is log2(2nx).[56] In other words:

 

For normalized floating-point numbers, the integer part is given by the floating-point exponent,[57] and for integers it can be determined by performing a count leading zeros operation.[58]

The fractional part of the result is log2y and can be computed iteratively, using only elementary multiplication and division.[56] The algorithm for computing the fractional part can be described in pseudocode as follows:

  1. Start with a real number y in the half-open interval [1, 2). If y = 1, then the algorithm is done, and the fractional part is zero.
  2. Otherwise, square y repeatedly until the result z lies in the interval [2, 4). Let m be the number of squarings needed. That is, z = y2m with m chosen such that z is in [2, 4).
  3. Taking the logarithm of both sides and doing some algebra:
     
  4. Once again z/2 is a real number in the interval [1, 2). Return to step 1 and compute the binary logarithm of z/2 using the same method.

The result of this is expressed by the following recursive formulas, in which   is the number of squarings required in the i-th iteration of the algorithm:

 

In the special case where the fractional part in step 1 is found to be zero, this is a finite sequence terminating at some point. Otherwise, it is an infinite series that converges according to the ratio test, since each term is strictly less than the previous one (since every mi > 0). For practical use, this infinite series must be truncated to reach an approximate result. If the series is truncated after the i-th term, then the error in the result is less than 2−(m1 + m2 + ⋯ + mi).[56]

Software library support edit

The log2 function is included in the standard C mathematical functions. The default version of this function takes double precision arguments but variants of it allow the argument to be single-precision or to be a long double.[59] In computing environments supporting complex numbers and implicit type conversion such as MATLAB the argument to the log2 function is allowed to be a negative number, returning a complex one.[60]

References edit

  1. ^ Groza, Vivian Shaw; Shelley, Susanne M. (1972), Precalculus mathematics, New York: Holt, Rinehart and Winston, p. 182, ISBN 978-0-03-077670-0.
  2. ^ Stifel, Michael (1544), Arithmetica integra (in Latin), p. 31. A copy of the same table with two more entries appears on p. 237, and another copy extended to negative powers appears on p. 249b.
  3. ^ Joseph, G. G. (2011), The Crest of the Peacock: Non-European Roots of Mathematics (3rd ed.), Princeton University Press, p. 352.
  4. ^ See, e.g., Shparlinski, Igor (2013), Cryptographic Applications of Analytic Number Theory: Complexity Lower Bounds and Pseudorandomness, Progress in Computer Science and Applied Logic, vol. 22, Birkhäuser, p. 35, ISBN 978-3-0348-8037-4.
  5. ^ Euler, Leonhard (1739), "Chapter VII. De Variorum Intervallorum Receptis Appelationibus", Tentamen novae theoriae musicae ex certissismis harmoniae principiis dilucide expositae (in Latin), Saint Petersburg Academy, pp. 102–112.
  6. ^ Tegg, Thomas (1829), "Binary logarithms", London encyclopaedia; or, Universal dictionary of science, art, literature and practical mechanics: comprising a popular view of the present state of knowledge, Volume 4, pp. 142–143.
  7. ^ Batschelet, E. (2012), Introduction to Mathematics for Life Scientists, Springer, p. 128, ISBN 978-3-642-96080-2.
  8. ^ For instance, Microsoft Excel provides the IMLOG2 function for complex binary logarithms: see Bourg, David M. (2006), Excel Scientific and Engineering Cookbook, O'Reilly Media, p. 232, ISBN 978-0-596-55317-3.
  9. ^ Kolman, Bernard; Shapiro, Arnold (1982), "11.4 Properties of Logarithms", Algebra for College Students, Academic Press, pp. 334–335, ISBN 978-1-4832-7121-7.
  10. ^ For instance, this is the notation used in the Encyclopedia of Mathematics and The Princeton Companion to Mathematics.
  11. ^ a b Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001) [1990], Introduction to Algorithms (2nd ed.), MIT Press and McGraw-Hill, pp. 34, 53–54, ISBN 0-262-03293-7
  12. ^ a b Sedgewick, Robert; Wayne, Kevin Daniel (2011), Algorithms, Addison-Wesley Professional, p. 185, ISBN 978-0-321-57351-3.
  13. ^ The Chicago Manual of Style (25th ed.), University of Chicago Press, 2003, p. 530.
  14. ^ a b Knuth, Donald E. (1997), Fundamental Algorithms, The Art of Computer Programming, vol. 1 (3rd ed.), Addison-Wesley Professional, ISBN 978-0-321-63574-7, p. 11. The same notation was in the 1973 2nd edition of the same book (p. 23) but without the credit to Reingold.
  15. ^ Trucco, Ernesto (1956), "A note on the information content of graphs", Bull. Math. Biophys., 18 (2): 129–135, doi:10.1007/BF02477836, MR 0077919.
  16. ^ Mitchell, John N. (1962), "Computer multiplication and division using binary logarithms", IRE Transactions on Electronic Computers, EC-11 (4): 512–517, doi:10.1109/TEC.1962.5219391.
  17. ^ Fiche, Georges; Hebuterne, Gerard (2013), Mathematics for Engineers, John Wiley & Sons, p. 152, ISBN 978-1-118-62333-6, In the following, and unless otherwise stated, the notation log x always stands for the logarithm to the base 2 of x.
  18. ^ Cover, Thomas M.; Thomas, Joy A. (2012), Elements of Information Theory (2nd ed.), John Wiley & Sons, p. 33, ISBN 978-1-118-58577-1, Unless otherwise specified, we will take all logarithms to base 2.
  19. ^ a b Goodrich, Michael T.; Tamassia, Roberto (2002), Algorithm Design: Foundations, Analysis, and Internet Examples, John Wiley & Sons, p. 23, One of the interesting and sometimes even surprising aspects of the analysis of data structures and algorithms is the ubiquitous presence of logarithms ... As is the custom in the computing literature, we omit writing the base b of the logarithm when b = 2.
  20. ^ a b c Tafel, Hans Jörg (1971), Einführung in die digitale Datenverarbeitung [Introduction to digital information processing] (in German), Munich: Carl Hanser Verlag, pp. 20–21, ISBN 3-446-10569-7
  21. ^ Tietze, Ulrich; Schenk, Christoph (1999), Halbleiter-Schaltungstechnik (in German) (1st corrected reprint, 11th ed.), Springer Verlag, p. 1370, ISBN 3-540-64192-0
  22. ^ Bauer, Friedrich L. (2009), Origins and Foundations of Computing: In Cooperation with Heinz Nixdorf MuseumsForum, Springer Science & Business Media, p. 54, ISBN 978-3-642-02991-2.
  23. ^ For DIN 1302 see Brockhaus Enzyklopädie in zwanzig Bänden [Brockhaus Encyclopedia in Twenty Volumes] (in German), vol. 11, Wiesbaden: F.A. Brockhaus, 1970, p. 554, ISBN 978-3-7653-0000-4.
  24. ^ For ISO 31-11 see Thompson, Ambler; Taylor, Barry M (March 2008), Guide for the Use of the International System of Units (SI) — NIST Special Publication 811, 2008 Edition — Second Printing (PDF), NIST, p. 33.
  25. ^ For ISO 80000-2 see "Quantities and units – Part 2: Mathematical signs and symbols to be used in the natural sciences and technology" (PDF), International Standard ISO 80000-2 (1st ed.), December 1, 2009, Section 12, Exponential and logarithmic functions, p. 18.
  26. ^ Van der Lubbe, Jan C. A. (1997), Information Theory, Cambridge University Press, p. 3, ISBN 978-0-521-46760-5.
  27. ^ Stewart, Ian (2015), Taming the Infinite, Quercus, p. 120, ISBN 9781623654733, in advanced mathematics and science the only logarithm of importance is the natural logarithm.
  28. ^ Leiss, Ernst L. (2006), A Programmer's Companion to Algorithm Analysis, CRC Press, p. 28, ISBN 978-1-4200-1170-8.
  29. ^ Devroye, L.; Kruszewski, P. (1996), "On the Horton–Strahler number for random tries", RAIRO Informatique Théorique et Applications, 30 (5): 443–456, doi:10.1051/ita/1996300504431, MR 1435732.
  30. ^ Equivalently, a family with k distinct elements has at most 2k distinct sets, with equality when it is a power set.
  31. ^ Eppstein, David (2005), "The lattice dimension of a graph", European Journal of Combinatorics, 26 (5): 585–592, arXiv:cs.DS/0402028, doi:10.1016/j.ejc.2004.05.001, MR 2127682, S2CID 7482443.
  32. ^ Graham, Ronald L.; Rothschild, Bruce L.; Spencer, Joel H. (1980), Ramsey Theory, Wiley-Interscience, p. 78.
  33. ^ Bayer, Dave; Diaconis, Persi (1992), "Trailing the dovetail shuffle to its lair", The Annals of Applied Probability, 2 (2): 294–313, doi:10.1214/aoap/1177005705, JSTOR 2959752, MR 1161056.
  34. ^ Mehlhorn, Kurt; Sanders, Peter (2008), "2.5 An example – binary search", Algorithms and Data Structures: The Basic Toolbox (PDF), Springer, pp. 34–36, ISBN 978-3-540-77977-3.
  35. ^ Roberts, Fred; Tesman, Barry (2009), Applied Combinatorics (2nd ed.), CRC Press, p. 206, ISBN 978-1-4200-9983-6.
  36. ^ Sipser, Michael (2012), "Example 7.4", Introduction to the Theory of Computation (3rd ed.), Cengage Learning, pp. 277–278, ISBN 9781133187790.
  37. ^ Sedgewick & Wayne (2011), p. 186.
  38. ^ Cormen et al. (2001), p. 156; Goodrich & Tamassia (2002), p. 238.
  39. ^ Cormen et al. (2001), p. 276; Goodrich & Tamassia (2002), p. 159.
  40. ^ Cormen et al. (2001), p. 879–880; Goodrich & Tamassia (2002), p. 464.
  41. ^ Edmonds, Jeff (2008), How to Think About Algorithms, Cambridge University Press, p. 302, ISBN 978-1-139-47175-6.
  42. ^ Cormen et al. (2001), p. 844; Goodrich & Tamassia (2002), p. 279.
  43. ^ Cormen et al. (2001), section 28.2..
  44. ^ Causton, Helen; Quackenbush, John; Brazma, Alvis (2009), Microarray Gene Expression Data Analysis: A Beginner's Guide, John Wiley & Sons, pp. 49–50, ISBN 978-1-4443-1156-3.
  45. ^ Eidhammer, Ingvar; Barsnes, Harald; Eide, Geir Egil; Martens, Lennart (2012), Computational and Statistical Methods for Protein Quantification by Mass Spectrometry, John Wiley & Sons, p. 105, ISBN 978-1-118-49378-6.
  46. ^ a b Campbell, Murray; Greated, Clive (1994), The Musician's Guide to Acoustics, Oxford University Press, p. 78, ISBN 978-0-19-159167-9.
  47. ^ Randel, Don Michael, ed. (2003), The Harvard Dictionary of Music (4th ed.), The Belknap Press of Harvard University Press, p. 416, ISBN 978-0-674-01163-2.
  48. ^ France, Robert (2008), Introduction to Physical Education and Sport Science, Cengage Learning, p. 282, ISBN 978-1-4180-5529-5.
  49. ^ Allen, Elizabeth; Triantaphillidou, Sophie (2011), The Manual of Photography, Taylor & Francis, p. 228, ISBN 978-0-240-52037-7.
  50. ^ a b Davis, Phil (1998), Beyond the Zone System, CRC Press, p. 17, ISBN 978-1-136-09294-7.
  51. ^ Allen & Triantaphillidou (2011), p. 235.
  52. ^ Zwerman, Susan; Okun, Jeffrey A. (2012), Visual Effects Society Handbook: Workflow and Techniques, CRC Press, p. 205, ISBN 978-1-136-13614-6.
  53. ^ Bauer, Craig P. (2013), Secret History: The Story of Cryptology, CRC Press, p. 332, ISBN 978-1-4665-6186-1.
  54. ^ a b Warren Jr., Henry S. (2002), Hacker's Delight (1st ed.), Addison Wesley, p. 215, ISBN 978-0-201-91465-8
  55. ^ fls, Linux kernel API, kernel.org, retrieved 2010-10-17.
  56. ^ a b c d Majithia, J. C.; Levan, D. (1973), "A note on base-2 logarithm computations", Proceedings of the IEEE, 61 (10): 1519–1520, doi:10.1109/PROC.1973.9318.
  57. ^ Stephenson, Ian (2005), "9.6 Fast Power, Log2, and Exp2 Functions", Production Rendering: Design and Implementation, Springer-Verlag, pp. 270–273, ISBN 978-1-84628-085-6.
  58. ^ Warren Jr., Henry S. (2013) [2002], "11-4: Integer Logarithm", Hacker's Delight (2nd ed.), Addison WesleyPearson Education, Inc., p. 291, ISBN 978-0-321-84268-8, 0-321-84268-5.
  59. ^ "7.12.6.10 The log2 functions", ISO/IEC 9899:1999 specification (PDF), p. 226.
  60. ^ Redfern, Darren; Campbell, Colin (1998), The Matlab® 5 Handbook, Springer-Verlag, p. 141, ISBN 978-1-4612-2170-8.

External links edit

  • Weisstein, Eric W., "Binary Logarithm", MathWorld
  • Anderson, Sean Eron (December 12, 2003), "Find the log base 2 of an N-bit integer in O(lg(N)) operations", Bit Twiddling Hacks, Stanford University, retrieved 2015-11-25
  • Feynman and the Connection Machine

binary, logarithm, mathematics, binary, logarithm, log2, power, which, number, must, raised, obtain, value, that, real, number, graph, log2, function, positive, real, number, displaystyle, quad, longleftrightarrow, quad, example, binary, logarithm, binary, log. In mathematics the binary logarithm log2 n is the power to which the number 2 must be raised to obtain the value n That is for any real number x Graph of log2 x as a function of a positive real number x x log 2 n 2 x n displaystyle x log 2 n quad Longleftrightarrow quad 2 x n For example the binary logarithm of 1 is 0 the binary logarithm of 2 is 1 the binary logarithm of 4 is 2 and the binary logarithm of 32 is 5 The binary logarithm is the logarithm to the base 2 and is the inverse function of the power of two function As well as log2 an alternative notation for the binary logarithm is lb the notation preferred by ISO 31 11 and ISO 80000 2 Historically the first application of binary logarithms was in music theory by Leonhard Euler the binary logarithm of a frequency ratio of two musical tones gives the number of octaves by which the tones differ Binary logarithms can be used to calculate the length of the representation of a number in the binary numeral system or the number of bits needed to encode a message in information theory In computer science they count the number of steps needed for binary search and related algorithms Other areas in which the binary logarithm is frequently used include combinatorics bioinformatics the design of sports tournaments and photography Binary logarithms are included in the standard C mathematical functions and other mathematical software packages Contents 1 History 2 Definition and properties 3 Notation 4 Applications 4 1 Information theory 4 2 Combinatorics 4 3 Computational complexity 4 4 Bioinformatics 4 5 Music theory 4 6 Sports scheduling 4 7 Photography 5 Calculation 5 1 Conversion from other bases 5 2 Integer rounding 5 3 Iterative approximation 5 4 Software library support 6 References 7 External linksHistory editMain article History of logarithms nbsp Leonhard Euler was the first to apply binary logarithms to music theory in 1739 The powers of two have been known since antiquity for instance they appear in Euclid s Elements Props IX 32 on the factorization of powers of two and IX 36 half of the Euclid Euler theorem on the structure of even perfect numbers And the binary logarithm of a power of two is just its position in the ordered sequence of powers of two On this basis Michael Stifel has been credited with publishing the first known table of binary logarithms in 1544 His book Arithmetica Integra contains several tables that show the integers with their corresponding powers of two Reversing the rows of these tables allow them to be interpreted as tables of binary logarithms 1 2 Earlier than Stifel the 8th century Jain mathematician Virasena is credited with a precursor to the binary logarithm Virasena s concept of ardhacheda has been defined as the number of times a given number can be divided evenly by two This definition gives rise to a function that coincides with the binary logarithm on the powers of two 3 but it is different for other integers giving the 2 adic order rather than the logarithm 4 The modern form of a binary logarithm applying to any number not just powers of two was considered explicitly by Leonhard Euler in 1739 Euler established the application of binary logarithms to music theory long before their applications in information theory and computer science became known As part of his work in this area Euler published a table of binary logarithms of the integers from 1 to 8 to seven decimal digits of accuracy 5 6 Definition and properties editThe binary logarithm function may be defined as the inverse function to the power of two function which is a strictly increasing function over the positive real numbers and therefore has a unique inverse 7 Alternatively it may be defined as ln n ln 2 where ln is the natural logarithm defined in any of its standard ways Using the complex logarithm in this definition allows the binary logarithm to be extended to the complex numbers 8 As with other logarithms the binary logarithm obeys the following equations which can be used to simplify formulas that combine binary logarithms with multiplication or exponentiation 9 log 2 x y log 2 x log 2 y displaystyle log 2 xy log 2 x log 2 y nbsp log 2 x y log 2 x log 2 y displaystyle log 2 frac x y log 2 x log 2 y nbsp log 2 x y y log 2 x displaystyle log 2 x y y log 2 x nbsp For more see list of logarithmic identities Notation editIn mathematics the binary logarithm of a number n is often written as log2 n 10 However several other notations for this function have been used or proposed especially in application areas Some authors write the binary logarithm as lg n 11 12 the notation listed in The Chicago Manual of Style 13 Donald Knuth credits this notation to a suggestion of Edward Reingold 14 but its use in both information theory and computer science dates to before Reingold was active 15 16 The binary logarithm has also been written as log n with a prior statement that the default base for the logarithm is 2 17 18 19 Another notation that is often used for the same function especially in the German scientific literature is ld n 20 21 22 from Latin logarithmus dualis 20 or logarithmus dyadis 20 The DIN 1302 de ISO 31 11 and ISO 80000 2 standards recommend yet another notation lb n According to these standards lg n should not be used for the binary logarithm as it is instead reserved for the common logarithm log10 n 23 24 25 Applications editSee also Doubling time Information theory edit The number of digits bits in the binary representation of a positive integer n is the integral part of 1 log2 n i e 12 log 2 n 1 displaystyle lfloor log 2 n rfloor 1 nbsp In information theory the definition of the amount of self information and information entropy is often expressed with the binary logarithm corresponding to making the bit the fundamental unit of information With these units the Shannon Hartley theorem expresses the information capacity of a channel as the binary logarithm of its signal to noise ratio plus one However the natural logarithm and the nat are also used in alternative notations for these definitions 26 Combinatorics edit nbsp A 16 player single elimination tournament bracket with the structure of a complete binary tree The height of the tree number of rounds of the tournament is the binary logarithm of the number of players rounded up to an integer Although the natural logarithm is more important than the binary logarithm in many areas of pure mathematics such as number theory and mathematical analysis 27 the binary logarithm has several applications in combinatorics Every binary tree with n leaves has height at least log2 n with equality when n is a power of two and the tree is a complete binary tree 28 Relatedly the Strahler number of a river system with n tributary streams is at most log2 n 1 29 Every family of sets with n different sets has at least log2 n elements in its union with equality when the family is a power set 30 Every partial cube with n vertices has isometric dimension at least log2 n and has at most 1 2 n log2 n edges with equality when the partial cube is a hypercube graph 31 According to Ramsey s theorem every n vertex undirected graph has either a clique or an independent set of size logarithmic in n The precise size that can be guaranteed is not known but the best bounds known on its size involve binary logarithms In particular all graphs have a clique or independent set of size at least 1 2 log2 n 1 o 1 and almost all graphs do not have a clique or independent set of size larger than 2 log2 n 1 o 1 32 From a mathematical analysis of the Gilbert Shannon Reeds model of random shuffles one can show that the number of times one needs to shuffle an n card deck of cards using riffle shuffles to get a distribution on permutations that is close to uniformly random is approximately 3 2 log2 n This calculation forms the basis for a recommendation that 52 card decks should be shuffled seven times 33 Computational complexity edit nbsp Binary search in a sorted array an algorithm whose time complexity involves binary logarithms The binary logarithm also frequently appears in the analysis of algorithms 19 not only because of the frequent use of binary number arithmetic in algorithms but also because binary logarithms occur in the analysis of algorithms based on two way branching 14 If a problem initially has n choices for its solution and each iteration of the algorithm reduces the number of choices by a factor of two then the number of iterations needed to select a single choice is again the integral part of log2 n This idea is used in the analysis of several algorithms and data structures For example in binary search the size of the problem to be solved is halved with each iteration and therefore roughly log2 n iterations are needed to obtain a solution for a problem of size n 34 Similarly a perfectly balanced binary search tree containing n elements has height log2 n 1 1 35 The running time of an algorithm is usually expressed in big O notation which is used to simplify expressions by omitting their constant factors and lower order terms Because logarithms in different bases differ from each other only by a constant factor algorithms that run in O log2 n time can also be said to run in say O log13 n time The base of the logarithm in expressions such as O log n or O n log n is therefore not important and can be omitted 11 36 However for logarithms that appear in the exponent of a time bound the base of the logarithm cannot be omitted For example O 2log2 n is not the same as O 2ln n because the former is equal to O n and the latter to O n0 6931 Algorithms with running time O n log n are sometimes called linearithmic 37 Some examples of algorithms with running time O log n or O n log n are Average time quicksort and other comparison sort algorithms 38 Searching in balanced binary search trees 39 Exponentiation by squaring 40 Longest increasing subsequence 41 Binary logarithms also occur in the exponents of the time bounds for some divide and conquer algorithms such as the Karatsuba algorithm for multiplying n bit numbers in time O nlog2 3 42 and the Strassen algorithm for multiplying n n matrices in time O nlog2 7 43 The occurrence of binary logarithms in these running times can be explained by reference to the master theorem for divide and conquer recurrences Bioinformatics edit nbsp A microarray for approximately 8700 genes The expression rates of these genes are compared using binary logarithms In bioinformatics microarrays are used to measure how strongly different genes are expressed in a sample of biological material Different rates of expression of a gene are often compared by using the binary logarithm of the ratio of expression rates the log ratio of two expression rates is defined as the binary logarithm of the ratio of the two rates Binary logarithms allow for a convenient comparison of expression rates a doubled expression rate can be described by a log ratio of 1 a halved expression rate can be described by a log ratio of 1 and an unchanged expression rate can be described by a log ratio of zero for instance 44 Data points obtained in this way are often visualized as a scatterplot in which one or both of the coordinate axes are binary logarithms of intensity ratios or in visualizations such as the MA plot and RA plot that rotate and scale these log ratio scatterplots 45 Music theory edit In music theory the interval or perceptual difference between two tones is determined by the ratio of their frequencies Intervals coming from rational number ratios with small numerators and denominators are perceived as particularly euphonious The simplest and most important of these intervals is the octave a frequency ratio of 2 1 The number of octaves by which two tones differ is the binary logarithm of their frequency ratio 46 To study tuning systems and other aspects of music theory that require finer distinctions between tones it is helpful to have a measure of the size of an interval that is finer than an octave and is additive as logarithms are rather than multiplicative as frequency ratios are That is if tones x y and z form a rising sequence of tones then the measure of the interval from x to y plus the measure of the interval from y to z should equal the measure of the interval from x to z Such a measure is given by the cent which divides the octave into 1200 equal intervals 12 semitones of 100 cents each Mathematically given tones with frequencies f1 and f2 the number of cents in the interval from f1 to f2 is 46 1200 log 2 f 1 f 2 displaystyle left 1200 log 2 frac f 1 f 2 right nbsp The millioctave is defined in the same way but with a multiplier of 1000 instead of 1200 47 Sports scheduling edit In competitive games and sports involving two players or teams in each game or match the binary logarithm indicates the number of rounds necessary in a single elimination tournament required to determine a winner For example a tournament of 4 players requires log2 4 2 rounds to determine the winner a tournament of 32 teams requires log2 32 5 rounds etc In this case for n players teams where n is not a power of 2 log2 n is rounded up since it is necessary to have at least one round in which not all remaining competitors play For example log2 6 is approximately 2 585 which rounds up to 3 indicating that a tournament of 6 teams requires 3 rounds either two teams sit out the first round or one team sits out the second round The same number of rounds is also necessary to determine a clear winner in a Swiss system tournament 48 Photography edit In photography exposure values are measured in terms of the binary logarithm of the amount of light reaching the film or sensor in accordance with the Weber Fechner law describing a logarithmic response of the human visual system to light A single stop of exposure is one unit on a base 2 logarithmic scale 49 50 More precisely the exposure value of a photograph is defined as log 2 N 2 t displaystyle log 2 frac N 2 t nbsp where N is the f number measuring the aperture of the lens during the exposure and t is the number of seconds of exposure 51 Binary logarithms expressed as stops are also used in densitometry to express the dynamic range of light sensitive materials or digital sensors 52 Calculation edit nbsp HP 35 scientific calculator 1972 The log and ln keys are in the top row there is no log2 key Conversion from other bases edit An easy way to calculate log2 n on calculators that do not have a log2 function is to use the natural logarithm ln or the common logarithm log or log10 functions which are found on most scientific calculators To change the logarithm base from e or 10 to 2 one can use the formulae 50 53 log 2 n ln n ln 2 log 10 n log 10 2 displaystyle log 2 n frac ln n ln 2 frac log 10 n log 10 2 nbsp or approximately log 2 n 1 442695 ln n 3 321928 log 10 n displaystyle log 2 n approx 1 442695 ln n approx 3 321928 log 10 n nbsp Integer rounding edit The binary logarithm can be made into a function from integers and to integers by rounding it up or down These two forms of integer binary logarithm are related by this formula log 2 n log 2 n 1 1 if n 1 displaystyle lfloor log 2 n rfloor lceil log 2 n 1 rceil 1 text if n geq 1 nbsp 54 The definition can be extended by defining log 2 0 1 displaystyle lfloor log 2 0 rfloor 1 nbsp Extended in this way this function is related to the number of leading zeros of the 32 bit unsigned binary representation of x nlz x log 2 n 31 nlz n displaystyle lfloor log 2 n rfloor 31 operatorname nlz n nbsp 54 The integer binary logarithm can be interpreted as the zero based index of the most significant 1 bit in the input In this sense it is the complement of the find first set operation which finds the index of the least significant 1 bit Many hardware platforms include support for finding the number of leading zeros or equivalent operations which can be used to quickly find the binary logarithm The fls and flsl functions in the Linux kernel 55 and in some versions of the libc software library also compute the binary logarithm rounded up to an integer plus one Iterative approximation edit For a general positive real number the binary logarithm may be computed in two parts 56 First one computes the integer part log 2 x displaystyle lfloor log 2 x rfloor nbsp called the characteristic of the logarithm This reduces the problem to one where the argument of the logarithm is in a restricted range the interval 1 2 simplifying the second step of computing the fractional part the mantissa of the logarithm For any x gt 0 there exists a unique integer n such that 2n x lt 2n 1 or equivalently 1 2 nx lt 2 Now the integer part of the logarithm is simply n and the fractional part is log2 2 nx 56 In other words log 2 x n log 2 y where y 2 n x and y 1 2 displaystyle log 2 x n log 2 y quad text where y 2 n x text and y in 1 2 nbsp For normalized floating point numbers the integer part is given by the floating point exponent 57 and for integers it can be determined by performing a count leading zeros operation 58 The fractional part of the result is log2 y and can be computed iteratively using only elementary multiplication and division 56 The algorithm for computing the fractional part can be described in pseudocode as follows Start with a real number y in the half open interval 1 2 If y 1 then the algorithm is done and the fractional part is zero Otherwise square y repeatedly until the result z lies in the interval 2 4 Let m be the number of squarings needed That is z y2m with m chosen such that z is in 2 4 Taking the logarithm of both sides and doing some algebra log 2 z 2 m log 2 y log 2 y log 2 z 2 m 1 log 2 z 2 2 m 2 m 2 m log 2 z 2 displaystyle begin aligned log 2 z amp 2 m log 2 y log 2 y amp frac log 2 z 2 m amp frac 1 log 2 z 2 2 m amp 2 m 2 m log 2 z 2 end aligned nbsp Once again z 2 is a real number in the interval 1 2 Return to step 1 and compute the binary logarithm of z 2 using the same method The result of this is expressed by the following recursive formulas in which m i displaystyle m i nbsp is the number of squarings required in the i th iteration of the algorithm log 2 x n 2 m 1 1 2 m 2 1 2 m 3 1 n 2 m 1 2 m 1 m 2 2 m 1 m 2 m 3 displaystyle begin aligned log 2 x amp n 2 m 1 left 1 2 m 2 left 1 2 m 3 left 1 cdots right right right amp n 2 m 1 2 m 1 m 2 2 m 1 m 2 m 3 cdots end aligned nbsp In the special case where the fractional part in step 1 is found to be zero this is a finite sequence terminating at some point Otherwise it is an infinite series that converges according to the ratio test since each term is strictly less than the previous one since every mi gt 0 For practical use this infinite series must be truncated to reach an approximate result If the series is truncated after the i th term then the error in the result is less than 2 m1 m2 mi 56 Software library support edit The log2 function is included in the standard C mathematical functions The default version of this function takes double precision arguments but variants of it allow the argument to be single precision or to be a long double 59 In computing environments supporting complex numbers and implicit type conversion such as MATLAB the argument to the log2 function is allowed to be a negative number returning a complex one 60 References edit Groza Vivian Shaw Shelley Susanne M 1972 Precalculus mathematics New York Holt Rinehart and Winston p 182 ISBN 978 0 03 077670 0 Stifel Michael 1544 Arithmetica integra in Latin p 31 A copy of the same table with two more entries appears on p 237 and another copy extended to negative powers appears on p 249b Joseph G G 2011 The Crest of the Peacock Non European Roots of Mathematics 3rd ed Princeton University Press p 352 See e g Shparlinski Igor 2013 Cryptographic Applications of Analytic Number Theory Complexity Lower Bounds and Pseudorandomness Progress in Computer Science and Applied Logic vol 22 Birkhauser p 35 ISBN 978 3 0348 8037 4 Euler Leonhard 1739 Chapter VII De Variorum Intervallorum Receptis Appelationibus Tentamen novae theoriae musicae ex certissismis harmoniae principiis dilucide expositae in Latin Saint Petersburg Academy pp 102 112 Tegg Thomas 1829 Binary logarithms London encyclopaedia or Universal dictionary of science art literature and practical mechanics comprising a popular view of the present state of knowledge Volume 4 pp 142 143 Batschelet E 2012 Introduction to Mathematics for Life Scientists Springer p 128 ISBN 978 3 642 96080 2 For instance Microsoft Excel provides the IMLOG2 function for complex binary logarithms see Bourg David M 2006 Excel Scientific and Engineering Cookbook O Reilly Media p 232 ISBN 978 0 596 55317 3 Kolman Bernard Shapiro Arnold 1982 11 4 Properties of Logarithms Algebra for College Students Academic Press pp 334 335 ISBN 978 1 4832 7121 7 For instance this is the notation used in the Encyclopedia of Mathematics and The Princeton Companion to Mathematics a b Cormen Thomas H Leiserson Charles E Rivest Ronald L Stein Clifford 2001 1990 Introduction to Algorithms 2nd ed MIT Press and McGraw Hill pp 34 53 54 ISBN 0 262 03293 7 a b Sedgewick Robert Wayne Kevin Daniel 2011 Algorithms Addison Wesley Professional p 185 ISBN 978 0 321 57351 3 The Chicago Manual of Style 25th ed University of Chicago Press 2003 p 530 a b Knuth Donald E 1997 Fundamental Algorithms The Art of Computer Programming vol 1 3rd ed Addison Wesley Professional ISBN 978 0 321 63574 7 p 11 The same notation was in the 1973 2nd edition of the same book p 23 but without the credit to Reingold Trucco Ernesto 1956 A note on the information content of graphs Bull Math Biophys 18 2 129 135 doi 10 1007 BF02477836 MR 0077919 Mitchell John N 1962 Computer multiplication and division using binary logarithms IRE Transactions on Electronic Computers EC 11 4 512 517 doi 10 1109 TEC 1962 5219391 Fiche Georges Hebuterne Gerard 2013 Mathematics for Engineers John Wiley amp Sons p 152 ISBN 978 1 118 62333 6 In the following and unless otherwise stated the notation log x always stands for the logarithm to the base 2 of x Cover Thomas M Thomas Joy A 2012 Elements of Information Theory 2nd ed John Wiley amp Sons p 33 ISBN 978 1 118 58577 1 Unless otherwise specified we will take all logarithms to base 2 a b Goodrich Michael T Tamassia Roberto 2002 Algorithm Design Foundations Analysis and Internet Examples John Wiley amp Sons p 23 One of the interesting and sometimes even surprising aspects of the analysis of data structures and algorithms is the ubiquitous presence of logarithms As is the custom in the computing literature we omit writing the base b of the logarithm when b 2 a b c Tafel Hans Jorg 1971 Einfuhrung in die digitale Datenverarbeitung Introduction to digital information processing in German Munich Carl Hanser Verlag pp 20 21 ISBN 3 446 10569 7 Tietze Ulrich Schenk Christoph 1999 Halbleiter Schaltungstechnik in German 1st corrected reprint 11th ed Springer Verlag p 1370 ISBN 3 540 64192 0 Bauer Friedrich L 2009 Origins and Foundations of Computing In Cooperation with Heinz Nixdorf MuseumsForum Springer Science amp Business Media p 54 ISBN 978 3 642 02991 2 For DIN 1302 see Brockhaus Enzyklopadie in zwanzig Banden Brockhaus Encyclopedia in Twenty Volumes in German vol 11 Wiesbaden F A Brockhaus 1970 p 554 ISBN 978 3 7653 0000 4 For ISO 31 11 see Thompson Ambler Taylor Barry M March 2008 Guide for the Use of the International System of Units SI NIST Special Publication 811 2008 Edition Second Printing PDF NIST p 33 For ISO 80000 2 see Quantities and units Part 2 Mathematical signs and symbols to be used in the natural sciences and technology PDF International Standard ISO 80000 2 1st ed December 1 2009 Section 12 Exponential and logarithmic functions p 18 Van der Lubbe Jan C A 1997 Information Theory Cambridge University Press p 3 ISBN 978 0 521 46760 5 Stewart Ian 2015 Taming the Infinite Quercus p 120 ISBN 9781623654733 in advanced mathematics and science the only logarithm of importance is the natural logarithm Leiss Ernst L 2006 A Programmer s Companion to Algorithm Analysis CRC Press p 28 ISBN 978 1 4200 1170 8 Devroye L Kruszewski P 1996 On the Horton Strahler number for random tries RAIRO Informatique Theorique et Applications 30 5 443 456 doi 10 1051 ita 1996300504431 MR 1435732 Equivalently a family with k distinct elements has at most 2k distinct sets with equality when it is a power set Eppstein David 2005 The lattice dimension of a graph European Journal of Combinatorics 26 5 585 592 arXiv cs DS 0402028 doi 10 1016 j ejc 2004 05 001 MR 2127682 S2CID 7482443 Graham Ronald L Rothschild Bruce L Spencer Joel H 1980 Ramsey Theory Wiley Interscience p 78 Bayer Dave Diaconis Persi 1992 Trailing the dovetail shuffle to its lair The Annals of Applied Probability 2 2 294 313 doi 10 1214 aoap 1177005705 JSTOR 2959752 MR 1161056 Mehlhorn Kurt Sanders Peter 2008 2 5 An example binary search Algorithms and Data Structures The Basic Toolbox PDF Springer pp 34 36 ISBN 978 3 540 77977 3 Roberts Fred Tesman Barry 2009 Applied Combinatorics 2nd ed CRC Press p 206 ISBN 978 1 4200 9983 6 Sipser Michael 2012 Example 7 4 Introduction to the Theory of Computation 3rd ed Cengage Learning pp 277 278 ISBN 9781133187790 Sedgewick amp Wayne 2011 p 186 Cormen et al 2001 p 156 Goodrich amp Tamassia 2002 p 238 Cormen et al 2001 p 276 Goodrich amp Tamassia 2002 p 159 Cormen et al 2001 p 879 880 Goodrich amp Tamassia 2002 p 464 Edmonds Jeff 2008 How to Think About Algorithms Cambridge University Press p 302 ISBN 978 1 139 47175 6 Cormen et al 2001 p 844 Goodrich amp Tamassia 2002 p 279 Cormen et al 2001 section 28 2 Causton Helen Quackenbush John Brazma Alvis 2009 Microarray Gene Expression Data Analysis A Beginner s Guide John Wiley amp Sons pp 49 50 ISBN 978 1 4443 1156 3 Eidhammer Ingvar Barsnes Harald Eide Geir Egil Martens Lennart 2012 Computational and Statistical Methods for Protein Quantification by Mass Spectrometry John Wiley amp Sons p 105 ISBN 978 1 118 49378 6 a b Campbell Murray Greated Clive 1994 The Musician s Guide to Acoustics Oxford University Press p 78 ISBN 978 0 19 159167 9 Randel Don Michael ed 2003 The Harvard Dictionary of Music 4th ed The Belknap Press of Harvard University Press p 416 ISBN 978 0 674 01163 2 France Robert 2008 Introduction to Physical Education and Sport Science Cengage Learning p 282 ISBN 978 1 4180 5529 5 Allen Elizabeth Triantaphillidou Sophie 2011 The Manual of Photography Taylor amp Francis p 228 ISBN 978 0 240 52037 7 a b Davis Phil 1998 Beyond the Zone System CRC Press p 17 ISBN 978 1 136 09294 7 Allen amp Triantaphillidou 2011 p 235 Zwerman Susan Okun Jeffrey A 2012 Visual Effects Society Handbook Workflow and Techniques CRC Press p 205 ISBN 978 1 136 13614 6 Bauer Craig P 2013 Secret History The Story of Cryptology CRC Press p 332 ISBN 978 1 4665 6186 1 a b Warren Jr Henry S 2002 Hacker s Delight 1st ed Addison Wesley p 215 ISBN 978 0 201 91465 8 fls Linux kernel API kernel org retrieved 2010 10 17 a b c d Majithia J C Levan D 1973 A note on base 2 logarithm computations Proceedings of the IEEE 61 10 1519 1520 doi 10 1109 PROC 1973 9318 Stephenson Ian 2005 9 6 Fast Power Log2 and Exp2 Functions Production Rendering Design and Implementation Springer Verlag pp 270 273 ISBN 978 1 84628 085 6 Warren Jr Henry S 2013 2002 11 4 Integer Logarithm Hacker s Delight 2nd ed Addison Wesley Pearson Education Inc p 291 ISBN 978 0 321 84268 8 0 321 84268 5 7 12 6 10 The log2 functions ISO IEC 9899 1999 specification PDF p 226 Redfern Darren Campbell Colin 1998 The Matlab 5 Handbook Springer Verlag p 141 ISBN 978 1 4612 2170 8 External links editWeisstein Eric W Binary Logarithm MathWorld Anderson Sean Eron December 12 2003 Find the log base 2 of an N bit integer in O lg N operations Bit Twiddling Hacks Stanford University retrieved 2015 11 25 Feynman and the Connection Machine Retrieved from https en wikipedia org w index php title Binary logarithm amp oldid 1192455513, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.