aboutsummaryrefslogtreecommitdiff
path: root/files/uk/web/javascript/reference/global_objects/math/asinh/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/uk/web/javascript/reference/global_objects/math/asinh/index.html')
-rw-r--r--files/uk/web/javascript/reference/global_objects/math/asinh/index.html92
1 files changed, 92 insertions, 0 deletions
diff --git a/files/uk/web/javascript/reference/global_objects/math/asinh/index.html b/files/uk/web/javascript/reference/global_objects/math/asinh/index.html
new file mode 100644
index 0000000000..4d58b44c80
--- /dev/null
+++ b/files/uk/web/javascript/reference/global_objects/math/asinh/index.html
@@ -0,0 +1,92 @@
+---
+title: Math.asinh()
+slug: Web/JavaScript/Reference/Global_Objects/Math/asinh
+tags:
+ - JavaScript
+ - Math
+ - Довідка
+ - метод
+translation_of: Web/JavaScript/Reference/Global_Objects/Math/asinh
+---
+<div>{{JSRef}}</div>
+
+<p>Функція <strong><code>Math.asinh()</code></strong> повертає гіперболічний арксинус числа, що являється:</p>
+
+<p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mrow><mo lspace="0em" rspace="thinmathspace">Math.asinh</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><mo lspace="0em" rspace="thinmathspace">arsinh</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mtext> такий унікальний </mtext><mspace width="thickmathspace"></mspace><mi>y,</mi><mo lspace="0em" rspace="0em">  для якого sinh</mo><mo stretchy="false">(</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><mi>x</mi></mrow><annotation encoding="TeX">\mathtt{\operatorname{Math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x</annotation></semantics></math></p>
+
+<div>{{EmbedInteractiveExample("pages/js/math-asinh.html")}}</div>
+
+<p class="hidden">Джерело цих інтерактивних прикладів зберігається у репозиторії на GitHub. Якщо ви маєте бажання зробити свій внесок у проект інтерактивних прикладів - будь ласка, зклонуйте репозиторій <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> та пришліть нам pull request.</p>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="syntaxbox"><code>Math.asinh(<var>x</var>)</code></pre>
+
+<h3 id="Аргументи">Аргументи</h3>
+
+<dl>
+ <dt><code>x</code></dt>
+ <dd>Число.</dd>
+</dl>
+
+<h3 id="Результат">Результат</h3>
+
+<p>Гіперболічний арксинус поданого числа.</p>
+
+<h2 id="Опис">Опис</h2>
+
+<p>Оскільки <code>asinh()</code> статичний метод об'єкту <code>Math</code>, він завжди використовується як <code>Math.asinh()</code>, а не як метод створеного об'єкту <code>Math</code>  (<code>Math</code> не є конструктором).</p>
+
+<h2 id="Приклади">Приклади</h2>
+
+<h3 id="Застосування_Math.asinh">Застосування <code>Math.asinh()</code></h3>
+
+<pre class="brush: js">Math.asinh(1); // 0.881373587019543
+Math.asinh(0); // 0
+</pre>
+
+<h2 id="Поліфіл">Поліфіл</h2>
+
+<p>В якості швидкого і брудного трюку для грубої імітації оригіналу можна застосувати формулу <math><semantics><mrow><mo lspace="0em" rspace="thinmathspace">arsinh</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mo lspace="0em" rspace="0em">ln</mo><mrow><mo>(</mo><mrow><mi>x</mi><mo>+</mo><msqrt><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mn>1</mn></mrow></msqrt></mrow><mo>)</mo></mrow></mrow><annotation encoding="TeX">\operatorname {arsinh} (x) = \ln \left(x + \sqrt{x^{2} + 1} \right)</annotation></semantics></math> у вигляді такої функції:</p>
+
+<pre class="brush: js">Math.asinh = Math.asinh || function(x) {
+ if (x === -Infinity) {
+ return x;
+ } else {
+ return Math.log(x + Math.sqrt(x * x + 1));
+ }
+};
+</pre>
+
+<p>Являючись формально вірною, вона страждає від значної кількості помилок, пов'язаних із обчисленням чисел із плаваючою комою. Точні результати потребують спеціальної обробки додатніх і від'ємних, дрібних і великих значень аргументів, так, як це зроблено, наприклад, у  <a href="https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/ieee754/dbl-64/s_asinh.c">glibc</a> чи <a href="http://git.savannah.gnu.org/cgit/gsl.git/tree/sys/invhyp.c">GNU Scientific Library</a>.</p>
+
+<h2 id="Специфікації">Специфікації</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Специфікація</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-math.asinh', 'Math.asinh')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Підтримка_у_браузерах">Підтримка у браузерах</h2>
+
+<p class="hidden">Таблиця сумісності на цій сторінці сформована автоматично із структурованих даних. Якщо ви маєте бажання зробити свій внесок до цих даних - будь-ласка, ось репозиторій <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>, надішліть нам свій pull request.</p>
+
+<p>{{Compat("javascript.builtins.Math.asinh")}}</p>
+
+<h2 id="Дивіться_також">Дивіться також</h2>
+
+<ul>
+ <li>{{jsxref("Math.acosh()")}}</li>
+ <li>{{jsxref("Math.atanh()")}}</li>
+ <li>{{jsxref("Math.cosh()")}}</li>
+ <li>{{jsxref("Math.sinh()")}}</li>
+ <li>{{jsxref("Math.tanh()")}}</li>
+</ul>