Floorlog
Floorlog is the floor of a logarithm. For a positive number n and a base b greater than 1, floorlog_b(n) is the greatest integer k such that b raised to the power k is less than or equal to n. Equivalently, floorlog_b(n) equals floor of log base b of n. The base b determines the scale: base 2 is common in computing, base 10 in decimal digit counting, and other bases appear in data encoding or numeral systems.
The case of base 2 is especially notable: floorlog_2(n) corresponds to the position of the most significant
Examples: floorlog_2(1) = 0, floorlog_2(2) = 1, floorlog_2(3) = 1, floorlog_2(4) = 2. For decimal base: floorlog_10(500) = 2 because 10^2
Computational notes: floorlog_b(n) can be computed by taking the floor of a logarithm, using floating-point arithmetic,
Applications: floorlog is used to determine the number of digits of a number in a given base,
See also: logarithm, floor function, bit length, most significant bit, integer logarithm.