main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 6 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
298 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var log = Math.log;
|
---|
| 3 |
|
---|
| 4 | // `Math.log1p` method implementation
|
---|
| 5 | // https://tc39.es/ecma262/#sec-math.log1p
|
---|
| 6 | // eslint-disable-next-line es/no-math-log1p -- safe
|
---|
| 7 | module.exports = Math.log1p || function log1p(x) {
|
---|
| 8 | var n = +x;
|
---|
| 9 | return n > -1e-8 && n < 1e-8 ? n - n * n / 2 : log(1 + n);
|
---|
| 10 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.