2016-10-10 03:43:44 +02:00
|
|
|
// 20.2.2.12 Math.cosh(x)
|
2017-08-14 05:01:11 +02:00
|
|
|
var $export = require('./_export');
|
|
|
|
var exp = Math.exp;
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
$export($export.S, 'Math', {
|
2017-08-14 05:01:11 +02:00
|
|
|
cosh: function cosh(x) {
|
2016-10-10 03:43:44 +02:00
|
|
|
return (exp(x = +x) + exp(-x)) / 2;
|
|
|
|
}
|
2017-08-14 05:01:11 +02:00
|
|
|
});
|