diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/README.md b/lib/node_modules/@stdlib/constants/float32/catalan/README.md new file mode 100644 index 000000000000..2284cd560d10 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/README.md @@ -0,0 +1,156 @@ + + +# FLOAT32_CATALAN + +> [Catalan's constant][catalan-constant]. + +
+ +[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 + + + +```math +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 +``` + + + + + +
+ + + +
+ +## Usage + +```javascript +var FLOAT32_CATALAN = require( '@stdlib/constants/float32/catalan' ); +``` + +#### FLOAT32_CATALAN + +[Catalan's constant][catalan-constant]. + +```javascript +var bool = ( FLOAT32_CATALAN === 0.9159656167030334 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var FLOAT32_CATALAN = require( '@stdlib/constants/float32/catalan' ); + +console.log( FLOAT32_CATALAN ); +// => 0.9159656167030334 +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/constants/float32/catalan.h" +``` + +#### STDLIB_CONSTANT_FLOAT32_CATALAN + +Macro for [Catalan's constant][catalan-constant]. + +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/docs/img/equation_catalan_constant.svg b/lib/node_modules/@stdlib/constants/float32/catalan/docs/img/equation_catalan_constant.svg new file mode 100644 index 000000000000..2eb47c7bc138 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/docs/img/equation_catalan_constant.svg @@ -0,0 +1,105 @@ + +upper C equals sigma-summation Underscript n equals 0 Overscript normal infinity Endscripts StartFraction left-parenthesis negative 1 right-parenthesis Superscript n Baseline Over left-parenthesis 2 n plus 1 right-parenthesis squared EndFraction equals StartFraction 1 Over 1 squared EndFraction minus StartFraction 1 Over 3 squared EndFraction plus StartFraction 1 Over 5 squared EndFraction minus StartFraction 1 Over 7 squared EndFraction plus midline-horizontal-ellipsis + + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/docs/repl.txt b/lib/node_modules/@stdlib/constants/float32/catalan/docs/repl.txt new file mode 100644 index 000000000000..5d6942855b92 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/docs/repl.txt @@ -0,0 +1,12 @@ + +{{alias}} + Catalan's constant. + + Examples + -------- + > {{alias}} + 0.9159656167030334 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float32/catalan/docs/types/index.d.ts new file mode 100644 index 000000000000..b55ceb3e6641 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/docs/types/index.d.ts @@ -0,0 +1,33 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Catalan's constant. +* +* @example +* var catalan = FLOAT32_CATALAN; +* // returns 0.9159656167030334 +*/ +declare const FLOAT32_CATALAN: number; + + +// EXPORTS // + +export = FLOAT32_CATALAN; diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float32/catalan/docs/types/test.ts new file mode 100644 index 000000000000..dd89fd76acc9 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/docs/types/test.ts @@ -0,0 +1,28 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import FLOAT32_CATALAN = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT32_CATALAN; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/examples/index.js b/lib/node_modules/@stdlib/constants/float32/catalan/examples/index.js new file mode 100644 index 000000000000..82b7fff6d8cd --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/examples/index.js @@ -0,0 +1,24 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var FLOAT32_CATALAN = require( './../lib' ); + +console.log( FLOAT32_CATALAN ); +// => 0.9159656167030334 diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/include/stdlib/constants/float32/catalan.h b/lib/node_modules/@stdlib/constants/float32/catalan/include/stdlib/constants/float32/catalan.h new file mode 100644 index 000000000000..5d4e076dbcf4 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/include/stdlib/constants/float32/catalan.h @@ -0,0 +1,27 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef STDLIB_CONSTANTS_FLOAT32_CATALAN_H +#define STDLIB_CONSTANTS_FLOAT32_CATALAN_H + +/** +* Macro for Catalan's constant. +*/ +#define STDLIB_CONSTANT_FLOAT32_CATALAN 0.91596559417721901f + +#endif // !STDLIB_CONSTANTS_FLOAT32_CATALAN_H diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/lib/index.js b/lib/node_modules/@stdlib/constants/float32/catalan/lib/index.js new file mode 100644 index 000000000000..f7ad2ebd6fde --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/lib/index.js @@ -0,0 +1,53 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Catalan's constant. +* +* @module @stdlib/constants/float32/catalan +* @type {number} +* +* @example +* var FOAL32_CATALAN = require( '@stdlib/constants/float32/catalan' ); +* // returns 0.9159656167030334 +*/ + +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// MAIN // + +/** +* Catalan's constant. +* +* @constant +* @type {number} +* @default 0.9159656167030334 +* @see [OEIS]{@link http://oeis.org/A006752} +* @see [Wikipedia]{@link https://en.wikipedia.org/wiki/Catalan%27s_constant} +*/ +var FOAL32_CATALAN = float64ToFloat32( 0.915965594177219 ); + + +// EXPORTS // + +module.exports = FOAL32_CATALAN; diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/manifest.json b/lib/node_modules/@stdlib/constants/float32/catalan/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/manifest.json @@ -0,0 +1,36 @@ +{ + "options": {}, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "src": [], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + } + ] +} diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/package.json b/lib/node_modules/@stdlib/constants/float32/catalan/package.json new file mode 100644 index 000000000000..656a91875a1b --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/package.json @@ -0,0 +1,71 @@ +{ + "name": "@stdlib/constants/float32/catalan", + "version": "0.0.0", + "description": "Catalan's constant.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "constant", + "const", + "mathematics", + "math", + "catalan", + "combinatorics", + "polygamma", + "trigamma", + "c", + "k", + "g", + "ieee754", + "precision", + "floating-point", + "float", + "float32" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float32/catalan/test/test.js b/lib/node_modules/@stdlib/constants/float32/catalan/test/test.js new file mode 100644 index 000000000000..761959050eec --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float32/catalan/test/test.js @@ -0,0 +1,38 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var FLOAT32_CATALAN = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT32_CATALAN, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'the exported value is a single-precision floating-point number equal to 0.9159656167030334', function test( t ) { + t.equal( FLOAT32_CATALAN, 0.9159656167030334, 'returns 0.9159656167030334' ); + t.end(); +});