Signature (Visual Basic / VBA)
Public Function Logarithm( _
ByVal vX As Variant _
) As Variant
Code Example
Logarithm(-1) = "0|3.14159265358979"
Logarithm(0) = "#NINF"
Logarithm(1) = 0
Logarithm(2) = 0.693147180559945
Logarithm(e) = 1
Logarithm(10) = 2.30258509299405
Logarithm("2.3|-4.5") = "1.6201229253022|-1.09829939127783"
Parameters
| Parameter | Description |
|---|---|
| vX | Number whose natural logarithm is returned. Function returns Null if vX is Null or cannot be fixed up to a real or complex number (as defined by the ComplexStringToReals function). Complex numbers are represented within strings as "R|I" where R is the real part and I is the imaginary part. Function returns the string "#NINF" to represent negative infinity if vX is 0 (zero). |