Math.asinh()
La funció Math.asinh()
retorna l'arcsinus hiperbòlic d'un nombre, és a dir
Sintaxi
Math.asinh(x)
Paràmetres
x
- Un nombre.
Descripció
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).
Exemples
Utilitzar Math.asinh()
Math.asinh(1); // 0.881373587019543
Math.asinh(0); // 0
Polyfill
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));
}
};
Especificacions
Especificació | Estat | Comentaris |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Math.asinh' in that specification. |
Standard | Definició inicial. |
Compatibilitat amb navegadors
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | 38 | 25 (25) | No support | 25 | 7.1 |
Característica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | No support | No support | 25.0 (25) | No support | No support | 8 |