simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

sech.md (869B)


      1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
      2 
      3 # Function sech
      4 
      5 Calculate the hyperbolic secant of a value,
      6 defined as `sech(x) = 1 / cosh(x)`.
      7 
      8 For matrices, the function is evaluated element wise.
      9 
     10 
     11 ## Syntax
     12 
     13 ```js
     14 math.sech(x)
     15 ```
     16 
     17 ### Parameters
     18 
     19 Parameter | Type | Description
     20 --------- | ---- | -----------
     21 `x` | number &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Function input
     22 
     23 ### Returns
     24 
     25 Type | Description
     26 ---- | -----------
     27 number &#124; Complex &#124; Array &#124; Matrix | Hyperbolic secant of x
     28 
     29 
     30 ### Throws
     31 
     32 Type | Description
     33 ---- | -----------
     34 
     35 
     36 ## Examples
     37 
     38 ```js
     39 // sech(x) = 1/ cosh(x)
     40 math.sech(0.5)       // returns 0.886818883970074
     41 1 / math.cosh(0.5)   // returns 0.886818883970074
     42 ```
     43 
     44 
     45 ## See also
     46 
     47 [cosh](cosh.md),
     48 [csch](csch.md),
     49 [coth](coth.md)