--- title: Math.asinh() slug: Web/JavaScript/Referencia/Objectes_globals/Math/asinh translation_of: Web/JavaScript/Reference/Global_Objects/Math/asinh ---
La funció Math.asinh()
retorna l'arcsinus hiperbòlic d'un nombre, és a dir
Math.asinh(x)
x
Com que que asinh
() és un mètode estàtic de Math, sempre s'utilitza com a Math.asinh
(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).
Math.asinh()
Math.asinh(1); // 0.881373587019543 Math.asinh(0); // 0
Tenim que amb el que podem emular el comportament amb la funció següent:
Math.asinh = Math.asinh || function(x) { if (x === -Infinity) { return x; } else { return Math.log(x + Math.sqrt(x * x + 1)); } };
Especificació | Estat | Comentaris |
---|---|---|
{{SpecName('ES6', '#sec-math.asinh', 'Math.asinh')}} | {{Spec2('ES6')}} | Definició inicial. |
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | {{CompatChrome("38")}} | {{CompatGeckoDesktop("25")}} | {{CompatNo}} | {{CompatOpera("25")}} | {{CompatSafari("7.1")}} |
Característica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | {{CompatNo}} | {{CompatNo}} | {{CompatGeckoMobile("25")}} | {{CompatNo}} | {{CompatNo}} | 8 |