Math.Log(Value[, Base])
.Log() returns the power for a given Value and Base.
Applies To
Description
Math.Log() returns the power for a given Value and Base. If the optional Base is not provided, DEACOM will use Euler's number as the base.
Note: Given Values less than or equal to 0 will result in a scripting error prompt.
Properties and Methods
None
Available
The .Log(Value[, Base]) method is available in:
- 15.03.016
- All newer builds
Type
Decimal
Syntax
Math.Log(Value[, Base]);
Parameters
Parameter |
Required |
Description |
---|---|---|
Value |
Yes |
Any positive number. Values <= 0 will return a scripting error' |
Base |
No |
The optional base to use in the equation. If left blank this will be Euler's number. |
Example
Event.Form.MessageBox('Math.Log(1): ' + Math.Log(1) +
'\nMath.Log(10): ' + Math.Log(10) +
'\nMath.Log(625, 5): ' + Math.Log(625, 5) +
'\nMath.Log(65536, 2): ' + Math.Log(65536, 2));
/* Expected System Prompt Display:
Math.Log(1): 0
Math.Log(10): 2.30258509299405
Math.Log(625, 5): 4
Math.Log(65536, 2): 16
*/