time-to-botec

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

README.md (2705B)


      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 # y0
     22 
     23 > Compute the [Bessel function of the second kind][bessel-second-kind] of order zero.
     24 
     25 <section class="intro">
     26 
     27 The [Bessel function of the second kind][bessel-second-kind] of order zero is defined as
     28 
     29 <!-- <equation class="equation" label="eq:bessel_second_kind_order_zero" align="center" raw="Y_0(x) = \frac{1}{\pi} \int_0^\pi \sin(x \sin\theta) \, d\theta -\frac{2}{\pi} \int_0^\infty  e^{-x \sinh t} \, dt." alt="Bessel function of the second kind of order zero"> -->
     30 
     31 <div class="equation" align="center" data-raw-text="Y_0(x) = \frac{1}{\pi} \int_0^\pi \sin(x \sin\theta) \, d\theta -\frac{2}{\pi} \int_0^\infty  e^{-x \sinh t} \, dt." data-equation="eq:bessel_second_kind_order_zero">
     32     <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/bessely0/docs/img/equation_bessel_second_kind_order_zero.svg" alt="Bessel function of the second kind of order zero">
     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 y0 = require( '@stdlib/math/base/special/bessely0' );
     48 ```
     49 
     50 #### y0( x )
     51 
     52 Computes the [Bessel function of the second kind][bessel-second-kind] of order zero at `x`.
     53 
     54 ```javascript
     55 var v = y0( 0.0 );
     56 // returns -Infinity
     57 
     58 v = y0( 1.0 );
     59 // returns ~0.088
     60 
     61 v = y0( Infinity );
     62 // returns 0.0
     63 ```
     64 
     65 If `x < 0` or `x` is `NaN`, the function returns `NaN`.
     66 
     67 ```javascript
     68 var v = y0( -1.0 );
     69 // returns NaN
     70 
     71 v = y0( -Infinity );
     72 // returns NaN
     73 
     74 v = y0( 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 randu = require( '@stdlib/random/base/randu' );
     90 var y0 = require( '@stdlib/math/base/special/bessely0' );
     91 
     92 var x;
     93 var i;
     94 
     95 for ( i = 0; i < 100; i++ ) {
     96     x = randu() * 10.0;
     97     console.log( 'y0(%d) = %d', x, y0( x ) );
     98 }
     99 ```
    100 
    101 </section>
    102 
    103 <!-- /.examples -->
    104 
    105 <section class="links">
    106 
    107 [bessel-second-kind]: https://en.wikipedia.org/wiki/Bessel_function#Bessel_functions_of_the_second_kind:_Y.CE.B1
    108 
    109 </section>
    110 
    111 <!-- /.links -->