Log
The logarithm of a number, in base 10 or any other base.
Node id math/log
The Log node outputs the power to which base must be raised to give
value: the logarithm of 1000 in base 10 is 3, of 8 in base 2 is 3.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| value | number | 0 | |
| base | number | 10 |
Outputs
| Name | Type | Notes |
|---|---|---|
| result | number |
Behaviour
- Base.
basedefaults to 10. For base e, use Natural Log. - Precision. The result is computed as ln(
value) / ln(base), so it may be off by a tiny amount: log of 1000 in base 10 can come out as 2.9999999999999996. Use Round when a whole number is expected. - Invalid math. A
valueof 0 or less, or abaseof 1, 0 or less, gives NaN or ±Infinity, with no error.
Related nodes
- Natural Log: the logarithm in base e.
- Power: the inverse operation.