time-to-botec

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

README.md (1605B)


      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 # asin
     22 
     23 > Compute the [arcsine][arcsine] of a number.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var asin = require( '@stdlib/math/base/special/asin' );
     31 ```
     32 
     33 #### asin( x )
     34 
     35 Computes the [arcsine][arcsine] of a `number` (in radians).
     36 
     37 ```javascript
     38 var v = asin( 0.0 );
     39 // returns 0.0
     40 
     41 v = asin( -3.141592653589793/6.0 );
     42 // returns ~-0.551
     43 ```
     44 
     45 The domain of `x` is restricted to `[-1,1]`. If `|x| > 1`, the function returns `NaN`.
     46 
     47 ```javascript
     48 var v = asin( -3.14 );
     49 // returns NaN
     50 ```
     51 
     52 </section>
     53 
     54 <!-- /.usage -->
     55 
     56 <section class="examples">
     57 
     58 ## Examples
     59 
     60 <!-- eslint no-undef: "error" -->
     61 
     62 ```javascript
     63 var linspace = require( '@stdlib/array/linspace' );
     64 var asin = require( '@stdlib/math/base/special/asin' );
     65 
     66 var x = linspace( -1.0, 1.0, 100 );
     67 var i;
     68 
     69 for ( i = 0; i < x.length; i++ ) {
     70     console.log( asin( x[ i ] ) );
     71 }
     72 ```
     73 
     74 </section>
     75 
     76 <!-- /.examples -->
     77 
     78 <section class="links">
     79 
     80 [arcsine]: https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
     81 
     82 </section>
     83 
     84 <!-- /.links -->