ilog2
compute integer base 2 logarithm
ilog10
compute integer base 10 logarithm
ilog[b]
compute integer base b logarithm
Calling Sequence
Parameters
Description
Thread Safety
Examples
ilog2(x)
ilog10(x)
ilog[b](x)
ilogb⁡x
x
-
expression
b
positive real number
These functions compute integer approximations to logarithms of x. They are based on the IEEE function logb.
The ilog[b](x) function approximates the integer base b logarithm, where the default base is exp(1).
You can enter the command ilog[b] using either the 1-D or 2-D calling sequence. For example, ilog[2](50) is equivalent to ilog2⁡50.
If x is real, ilog[b](x) returns r such that br≤|x|⁢<br+1.
The ilog2(x) function returns the integer base 2 logarithm of x.
If x is real and r = ilog2(x), then r is either an exact integer or special symbolic value, and 2r≤|x|<2r+1.
If x is a complex numeric, ilog2(x) returns max(ilog2(Re(x)), ilog2(Im(x))).
If x is a special symbolic value, the indicated result is returned.
1. ilog2⁡undefined=undefined
2. ilog2±∞ = ∞
3. ilog2±0 = −∞
The ilog10(x) function returns the integer base 10 logarithm of x.
If x is real, ilog10(x) returns r such that r is either an exact integer or special symbolic value, and10r≤|x|<10r+1.
If x is a complex numeric, ilog10(x) returns max(ilog10(Re(x)), ilog10(Im(x))).
1. ilog10⁡undefined=undefined
3. ilog2±∞ = −∞
The computation of ilog2(x) and ilog10(x) is more efficient than ilog[b](x), b <> 2, 10.
The ilog2 and ilog10 commands are thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
ilog10⁡x
ilog10⁡150
2
ilog10⁡10−37
−37
ilog10⁡214+310⁢I
4
ilog2⁡50
5
ilog2⁡28
8
ilog3⁡10
ilogⅇ⁡3
1
See Also
exceptions
float
initialfunctions
type
Download Help Document