time-to-botec

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

README.md (1929B)


      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 # acosh
     22 
     23 > Compute the [hyperbolic arccosine][inverse-hyperbolic] of a number.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var acosh = require( '@stdlib/math/base/special/fast/acosh' );
     31 ```
     32 
     33 #### acosh( x )
     34 
     35 Computes the [hyperbolic arccosine][inverse-hyperbolic] of a `number` (in radians).
     36 
     37 ```javascript
     38 var v = acosh( 1.0 );
     39 // returns 0.0
     40 
     41 v = acosh( 2.0 );
     42 // returns ~1.317
     43 
     44 v = acosh( 0.5 );
     45 // returns NaN
     46 ```
     47 
     48 The domain of `x` is restricted to `[1,+infinity)`. If `x < 1`, the function will return `NaN`.
     49 
     50 ```javascript
     51 var v = acosh( 0.0 );
     52 // returns NaN
     53 ```
     54 
     55 </section>
     56 
     57 <!-- /.usage -->
     58 
     59 <section class="notes">
     60 
     61 ## Notes
     62 
     63 -   For large `x`, the function will overflow.
     64 
     65     ```javascript
     66     var v = acosh( 1.0e308 );
     67     // returns Infinity
     68     // (expected 709.889355822726)
     69     ```
     70 
     71 </section>
     72 
     73 <!-- /.notes -->
     74 
     75 <section class="examples">
     76 
     77 ## Examples
     78 
     79 <!-- eslint no-undef: "error" -->
     80 
     81 ```javascript
     82 var linspace = require( '@stdlib/array/linspace' );
     83 var acosh = require( '@stdlib/math/base/special/fast/acosh' );
     84 
     85 var x = linspace( 1.0, 5.0, 103 );
     86 var i;
     87 
     88 for ( i = 0; i < x.length; i++ ) {
     89     console.log( acosh( x[ i ] ) );
     90 }
     91 ```
     92 
     93 </section>
     94 
     95 <!-- /.examples -->
     96 
     97 <section class="links">
     98 
     99 [inverse-hyperbolic]: https://en.wikipedia.org/wiki/Inverse_hyperbolic_function
    100 
    101 </section>
    102 
    103 <!-- /.links -->