A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh below:

Math.atanh() - JavaScript | MDN

Math.atanh()

Baseline Widely available

Сводка

Метод Math.atanh() возвращает гиперболический арктангенс числа, то есть

∀ x ∊ ( - 1 , 1 ) , Math.atanh ( x ) = arctanh ( x ) = уникальный y такой, что tanh ( y ) = x \forall x \in \left( -1, 1 \right), \mathtt{\operatorname{Math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ уникальный } ; y ; \text{такой, что} ; \tanh(y) = x Синтаксис Параметры Описание

Поскольку метод atanh() является статическим методом объекта Math, вы всегда должны использовать его как Math.atanh(), а не пытаться вызывать метод на созданном экземпляре объекта Math (поскольку объект Math не является конструктором).

Примеры Пример: использование метода Math.atanh()
Math.atanh(-2); // NaN
Math.atanh(-1); // -Infinity
Math.atanh(0); // 0
Math.atanh(0.5); // 0.5493061443340548
Math.atanh(1); // Infinity
Math.atanh(2); // NaN

Для значений, меньших -1 или больших 1, метод Math.atanh() возвращает NaN.

Полифил

Для | x | < 1 \left|x\right| < 1 , мы имеем artanh ( x ) = 1 2 ln ( 1 + x 1 - x ) \operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) , так что этот метод может эмулироваться следующим образом:

Math.atanh =
  Math.atanh ||
  function (x) {
    return Math.log((1 + x) / (1 - x)) / 2;
  };
Спецификации Совместимость с браузерами Смотрите также

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4