logb
Logb, or the logarithm to base b, is the exponent y that satisfies b^y = x. In the real-valued sense, this definition requires the base b to be positive and not equal to 1, and the argument x to be positive. The logarithm is the inverse function of the exponential base b: if y = logb(x), then b^y = x, and conversely logb(b^y) = y.
Base constraints and behavior: If b > 1, logb(x) is increasing in x; if 0 < b < 1,
Key properties: logb(1) = 0 and logb(b) = 1. It satisfies logb(xy) = logb(x) + logb(y) and logb(x^r) = r logb(x)
Examples: log2(8) = 3, log10(1000) = 3, log1/2(4) = -2. In many programming languages, logb may be implemented via