time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (1808B)


      1 <!--
      2 
      3 @license Apache-2.0
      4 
      5 Copyright (c) 2018 The Stdlib Authors.
      6 
      7 Licensed under the Apache License, Version 2.0 (the "License");
      8 you may not use this file except in compliance with the License.
      9 You may obtain a copy of the License at
     10 
     11    http://www.apache.org/licenses/LICENSE-2.0
     12 
     13 Unless required by applicable law or agreed to in writing, software
     14 distributed under the License is distributed on an "AS IS" BASIS,
     15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 See the License for the specific language governing permissions and
     17 limitations under the License.
     18 
     19 -->
     20 
     21 # acoth
     22 
     23 > Compute the [inverse hyperbolic cotangent][hyperbolic-arctangent] of a number.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var acoth = require( '@stdlib/math/base/special/acoth' );
     31 ```
     32 
     33 #### acoth( x )
     34 
     35 Computes the [inverse hyperbolic cotangent][hyperbolic-arctangent] of a `number` (in radians).
     36 
     37 ```javascript
     38 var v = acoth( 2.0 );
     39 // returns ~0.5493
     40 
     41 v = acoth( 1.0 );
     42 // returns Infinity
     43 ```
     44 
     45 The domain of the inverse hyperbolic cotangent is the union of the intervals `(-inf,-1]` and `[1,inf)`. If provided a value on the open interval `(-1,1)`, the function returns `NaN`.
     46 
     47 ```javascript
     48 var v = acoth( 0.0 );
     49 // returns NaN
     50 
     51 v = acoth( 0.5 );
     52 // returns NaN
     53 ```
     54 
     55 </section>
     56 
     57 <!-- /.usage -->
     58 
     59 <section class="examples">
     60 
     61 ## Examples
     62 
     63 <!-- eslint no-undef: "error" -->
     64 
     65 ```javascript
     66 var linspace = require( '@stdlib/array/linspace' );
     67 var acoth = require( '@stdlib/math/base/special/acoth' );
     68 
     69 var x = linspace( 1.0, 5.0, 100 );
     70 var i;
     71 
     72 for ( i = 0; i < x.length; i++ ) {
     73     console.log( acoth( x[ i ] ) );
     74 }
     75 ```
     76 
     77 </section>
     78 
     79 <!-- /.examples -->
     80 
     81 <section class="links">
     82 
     83 [hyperbolic-arctangent]: https://en.wikipedia.org/wiki/Inverse_hyperbolic_function
     84 
     85 </section>
     86 
     87 <!-- /.links -->