README.md (2496B)
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 # Arccovercosine 22 23 > Compute the [inverse coversed cosine][inverse-coversed-cosine]. 24 25 <section class="intro"> 26 27 The [inverse coversed cosine][inverse-coversed-cosine] is defined as 28 29 <!-- <equation class="equation" label="eq:arccovercosine" align="center" raw="\operatorname{acovercos}(\theta) = \arcsin(1+\theta)" alt="Inverse coversed cosine."> --> 30 31 <div class="equation" align="center" data-raw-text="\operatorname{acovercos}(\theta) = \arcsin(1+\theta)" data-equation="eq:arccovercosine"> 32 <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/acovercos/docs/img/equation_arccovercosine.svg" alt="Inverse coversed cosine."> 33 <br> 34 </div> 35 36 <!-- </equation> --> 37 38 </section> 39 40 <!-- /.intro --> 41 42 <section class="usage"> 43 44 ## Usage 45 46 ```javascript 47 var acovercos = require( '@stdlib/math/base/special/acovercos' ); 48 ``` 49 50 #### acovercos( x ) 51 52 Computes the [inverse coversed cosine][inverse-coversed-cosine]. 53 54 ```javascript 55 var v = acovercos( 0.0 ); 56 // returns ~1.5708 57 58 v = acovercos( -3.141592653589793/2.0 ); 59 // returns ~-0.6075 60 61 v = acovercos( -3.141592653589793/6.0 ); 62 // returns ~0.4966 63 ``` 64 65 If `x < -2`, `x > 0`, or `x` is `NaN`, the function returns `NaN`. 66 67 ```javascript 68 var v = acovercos( 1.0 ); 69 // returns NaN 70 71 v = acovercos( -3.14 ); 72 // returns NaN 73 74 v = acovercos( NaN ); 75 // returns NaN 76 ``` 77 78 </section> 79 80 <!-- /.usage --> 81 82 <section class="examples"> 83 84 ## Examples 85 86 <!-- eslint no-undef: "error" --> 87 88 ```javascript 89 var linspace = require( '@stdlib/array/linspace' ); 90 var acovercos = require( '@stdlib/math/base/special/acovercos' ); 91 92 var x = linspace( -2.0, 0.0, 100 ); 93 var i; 94 95 for ( i = 0; i < x.length; i++ ) { 96 console.log( acovercos( x[ i ] ) ); 97 } 98 ``` 99 100 </section> 101 102 <!-- /.examples --> 103 104 <section class="links"> 105 106 [inverse-coversed-cosine]: https://en.wikipedia.org/wiki/Versine 107 108 </section> 109 110 <!-- /.links -->