LOG

LOG(number)

Returns the natural logarithm of a number (Double).


numberThe number (Double).

REMARKS
* The "number" can be any numeric expression greater than zero.
* The natural logarithm is the logarithm to the base e. The constant e is approximately 2.718282.
* You can calculate base-n logarithms for any number x by dividing the natural logarithm of x by the natural logarithm of n as follows: Logn(x) = Log(x) / Log(n)
* You can use the EXP function to return the base of natural logarithm raised to a power.
* The equivalent Excel function is Application.WorksheetFunction.LN.
* The equivalent .NET function is System.Math.Log
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print Log(86)           '= 4.454  
Debug.Print Log(2.7182818) '= 1
Debug.Print VBA.Exp(Log(4)) '= 4

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top