Logbase
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Return the logarithm of positive numeric value x to a specified base y.
Syntax
Logbase(x,y)
Arguments
-
x
An integer or real number greater than zero
-
y
A positive integer indicating the base of the logarithm
Returns
The logarithm of x to base y
Exceptions
If x is zero or negative, or not a number, returns an error value
Example
-
Logbase(256, 2)
[Returns 8]
-
Logbase(1000, 10)
[Returns 3]
-
Logbase(TagVal('att1', '14-Dec-16'), 16)
[Return the logarithm of the value of 'att1' at 12:00am on Dec 14, 2016 to base 16]