README.md (2276B)
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 # Catalan's Constant 22 23 > [Catalan's constant][catalan-constant]. 24 25 <section class="intro"> 26 27 [Catalan's constant][catalan-constant] `C` (also denoted `K` or `G`) commonly appears in estimates of combinatorial functions and may be defined by the following infinite series 28 29 <!-- <equation class="equation" label="eq:catalan_constant" align="center" raw="C = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^2} = \frac{1}{1^2} - \frac{1}{3^2} + \frac{1}{5^2} - \frac{1}{7^2} + \cdots" alt="Catalan's constant"> --> 30 31 <div class="equation" align="center" data-raw-text="C = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^2} = \frac{1}{1^2} - \frac{1}{3^2} + \frac{1}{5^2} - \frac{1}{7^2} + \cdots" data-equation="eq:catalan_constant"> 32 <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@5d87cc7cb2c58aeb732872f89562d2c89571cc8a/lib/node_modules/@stdlib/constants/float64/catalan/docs/img/equation_catalan_constant.svg" alt="Catalan's constant"> 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 CATALAN = require( '@stdlib/constants/float64/catalan' ); 48 ``` 49 50 #### CATALAN 51 52 [Catalan's constant][catalan-constant]. 53 54 ```javascript 55 var bool = ( CATALAN === 0.915965594177219 ); 56 // returns true 57 ``` 58 59 </section> 60 61 <!-- /.usage --> 62 63 <section class="examples"> 64 65 ## Examples 66 67 <!-- TODO: better example --> 68 69 <!-- eslint no-undef: "error" --> 70 71 ```javascript 72 var CATALAN = require( '@stdlib/constants/float64/catalan' ); 73 74 console.log( CATALAN ); 75 // => 0.915965594177219 76 ``` 77 78 </section> 79 80 <!-- /.examples --> 81 82 <section class="links"> 83 84 [catalan-constant]: http://en.wikipedia.org/wiki/Catalan%27s_constant 85 86 </section> 87 88 <!-- /.links -->