README.md (2666B)
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 # Riemann Zeta Function 22 23 > [Riemann zeta][zeta-function] function. 24 25 <section class="intro"> 26 27 The [Riemann zeta][zeta-function] function is the [analytic continuation][analytic-continuation] of the infinite series 28 29 <!-- <equation class="equation" label="eq:riemann_zeta_function" align="center" raw="\zeta(s) =\sum_{k=1}^\infty\frac{1}{k^s}" alt="Riemann zeta function"> --> 30 31 <div class="equation" align="center" data-raw-text="\zeta(s) =\sum_{k=1}^\infty\frac{1}{k^s}" data-equation="eq:riemann_zeta_function"> 32 <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/riemann-zeta/docs/img/equation_riemann_zeta_function.svg" alt="Riemann zeta function"> 33 <br> 34 </div> 35 36 <!-- </equation> --> 37 38 where `s` is a complex variable equal to `σ + ti`. The series is only convergent when the real part of `s`, `σ`, is greater than `1`. 39 40 </section> 41 42 <!-- /.intro --> 43 44 <section class="usage"> 45 46 ## Usage 47 48 ```javascript 49 var zeta = require( '@stdlib/math/base/special/riemann-zeta' ); 50 ``` 51 52 #### zeta( s ) 53 54 Evaluates the [Riemann zeta][zeta-function] function as a function of a real variable `s` (i.e., `t = 0`). 55 56 ```javascript 57 var v = zeta( 1.1 ); 58 // returns ~10.584 59 60 v = zeta( -4.0 ); 61 // returns 0.0 62 63 v = zeta( 70.0 ); 64 // returns 1.0 65 66 v = zeta( 0.5 ); 67 // returns ~-1.46 68 69 v = zeta( 1.0 ); // pole 70 // returns NaN 71 72 v = zeta( NaN ); 73 // returns NaN 74 ``` 75 76 </section> 77 78 <!-- /.usage --> 79 80 <section class="examples"> 81 82 ## Examples 83 84 <!-- eslint no-undef: "error" --> 85 86 ```javascript 87 var linspace = require( '@stdlib/array/linspace' ); 88 var zeta = require( '@stdlib/math/base/special/riemann-zeta' ); 89 90 var s; 91 var v; 92 var i; 93 94 s = linspace( -50.0, 50.0, 200 ); 95 for ( i = 0; i < s.length; i++ ) { 96 v = zeta( s[ i ] ); 97 console.log( 's: %d, ζ(s): %d', s[ i ], v ); 98 } 99 ``` 100 101 </section> 102 103 <!-- /.examples --> 104 105 <section class="links"> 106 107 [zeta-function]: https://en.wikipedia.org/wiki/Riemann_zeta_function 108 109 [analytic-continuation]: https://en.wikipedia.org/wiki/Analytic_continuation 110 111 </section> 112 113 <!-- /.links -->