log
Returns the natural logarithm of the receiver or a logarithm with the supplied base.
API Reference
Signature
Parameters
Returns
Returns a new Arith instance. The receiver is not modified.
Throws
- Throws if an input value is invalid while
STRICTistrue.
Agent Contract
Agent Notes
- Do not generate
ln; uselog()for natural logarithms. - Do not assume decimal.js default semantics: Arith
log()defaults to basee, not base10. - Use
log10()for explicit base 10 andlog2()for explicit base 2. - Treat
Arithinstances as immutable.