Version 1
[yaffs-website] / node_modules / core-js / library / modules / es6.math.sinh.js
1 // 20.2.2.30 Math.sinh(x)
2 var $export = require('./_export')
3   , expm1   = require('./_math-expm1')
4   , exp     = Math.exp;
5
6 // V8 near Chromium 38 has a problem with very small numbers
7 $export($export.S + $export.F * require('./_fails')(function(){
8   return !Math.sinh(-2e-17) != -2e-17;
9 }), 'Math', {
10   sinh: function sinh(x){
11     return Math.abs(x = +x) < 1
12       ? (expm1(x) - expm1(-x)) / 2
13       : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
14   }
15 });