projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
fc77287f6176ff9e1f60549c485a0d8b046461fc
[platform/framework/web/crosswalk-tizen.git]
/
1
'use strict';
2
3
var log = Math.log, LOG10E = Math.LOG10E;
4
5
module.exports = function (x) {
6
if (isNaN(x)) return NaN;
7
x = Number(x);
8
if (x < 0) return NaN;
9
if (x === 0) return -Infinity;
10
if (x === 1) return 0;
11
if (x === Infinity) return Infinity;
12
13
return log(x) * LOG10E;
14
};