JavaScript log1p() method
- Forrige side log10()
- Næste side log2()
- Tilbage til toppen JavaScript Math Referencehåndbog
Definition and usage
log1p()
The method returns 1 + the natural logarithm of the specified number (base E).
Example
Return 1 + the natural logarithm of different numbers (base E):
var a = Math.log1p(2.7183); var b = Math.log1p(2); var c = Math.log1p(1); var d = Math.log1p(0); var e = Math.log1p(-1);
Syntax
Math.log1p(x)
Parameter value
Parameter | Description |
---|---|
x | Required. Number. |
Technical details
Return value: |
Number, representing the natural logarithm of 1 + the specified number (base E)
|
---|---|
JavaScript version: | ECMAScript 2015 |
Browserunderstøttelse
Metoder | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
log1p() | 38.0 | 12.0 | 25.0 | 8.0 | 25.0 |
Relaterede sider
Tilførsel:JavaScript matematik
- Forrige side log10()
- Næste side log2()
- Tilbage til toppen JavaScript Math Referencehåndbog