Show in Contents
Add to Favorites
Home: Smoke
Vector Functions
Function Reference
Defining Your Own Functions
Logarithmic Functions
Use the following functions
for performing various logarithmic calculations.
log
Returns
the natural logarithm of a given number. The log function is the
inverse of the exp function.
Syntax: |
log(Number) |
Arguments: |
- Number is the positive number of which
you want the natural logarithm.
|
Examples: |
- log(1) returns 0.
- log(2) returns 0.6931.
- log(exp(5)) returns 5.
- log(256) / log(2) returns 8.
- log(frame / 20) * 50 yields the following curve:
|
log10
Returns
the base-10 logarithm of a given number.
Syntax: |
log10(Number) |
Arguments: |
- Number is the positive number of which
you want the base-10logarithm.
|
Examples: |
- log10(1) returns 0.
- log10(10) returns 1.
- log10(100) returns 2.
|
log1p
Returns
the natural logarithm of 1 plus a given number. The log1p function
is the inverse of the expm1 function.
Syntax: |
log1p(Number) |
Arguments: |
- Number is the positive number less 1
of which you want the natural logarithm.
|
Examples: |
- log(0) returns 0.
- log(1) returns 0.6931.
- log1p(expm1(5)) returns 5.
- log1p(frame) returns the equivalent of log(1+frame).
- log1p(frame / 20) * 50 yields the following curve:
|
exp
Returns
the constant e (the base of the natural logarithm)
raised to the power of a given number. The exp function is the inverse
of the log function.
Syntax: |
exp(Number) |
Arguments: |
- Number is the exponent applied to the
base e.
|
Examples: |
- exp(0) returns 1.
- exp(1) returns 2.7182.
- exp(2) returns 7.3890.
- exp(log(5)) returns 5.
- exp(frame / 20) * 5 yields the following curve:
|
expm1
Returns
the constant e (the base of the natural logarithm)
raised to the power of a given number, minus 1. The expm1 function
is the inverse of the log1p function.
Syntax: |
expm1(Number) |
Arguments: |
- Number is the exponent applied to the
base e.
|
Examples: |
- expm1(0) returns 0.
- expm1(1) returns 1.7182.
- expm1(2) returns 6.3890.
- expm1(log1p(5)) returns 5.
- expm1(frame) returns the equivalent of
exp(frame) - 1.
|