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