2018-06-16 15:39:07 +02:00

45 lines
1.2 KiB
Markdown

---
layout: default
---
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
<h1 id="function-cosh">Function cosh <a href="#function-cosh" title="Permalink">#</a></h1>
Calculate the hyperbolic cosine of a value,
defined as `cosh(x) = 1/2 * (exp(x) + exp(-x))`.
For matrices, the function is evaluated element wise.
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>
```js
math.cosh(x)
```
<h3 id="parameters">Parameters <a href="#parameters" title="Permalink">#</a></h3>
Parameter | Type | Description
--------- | ---- | -----------
`x` | number &#124; BigNumber &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Function input
<h3 id="returns">Returns <a href="#returns" title="Permalink">#</a></h3>
Type | Description
---- | -----------
number &#124; BigNumber &#124; Complex &#124; Array &#124; Matrix | Hyperbolic cosine of x
<h2 id="examples">Examples <a href="#examples" title="Permalink">#</a></h2>
```js
math.cosh(0.5) // returns number 1.1276259652063807
```
<h2 id="see-also">See also <a href="#see-also" title="Permalink">#</a></h2>
[sinh](sinh.html),
[tanh](tanh.html)