From af76b51b0f291f29f7938e9cb9ca7928b487937f Mon Sep 17 00:00:00 2001 From: NEERAJ Date: Sat, 6 Dec 2025 21:47:31 +0530 Subject: [PATCH 1/4] feat: adding initial files --- .../constants/float16/catalan/README.md | 135 ++++++++++++++++++ .../constants/float16/catalan/docs/repl.txt | 12 ++ .../float16/catalan/docs/types/index.d.ts | 33 +++++ .../float16/catalan/docs/types/test.ts | 28 ++++ .../float16/catalan/examples/index.js | 24 ++++ .../constants/float16/catalan/lib/index.js | 49 +++++++ .../constants/float16/catalan/package.json | 71 +++++++++ .../constants/float16/catalan/test/test.js | 38 +++++ 8 files changed, 390 insertions(+) create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/README.md create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/examples/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/lib/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/package.json create mode 100644 lib/node_modules/@stdlib/constants/float16/catalan/test/test.js diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/README.md b/lib/node_modules/@stdlib/constants/float16/catalan/README.md new file mode 100644 index 000000000000..e991c3e6066e --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/catalan/README.md @@ -0,0 +1,135 @@ + + +# FLOAT16_CATALAN + +> [Catalan's constant][catalan-constant]. + +
+ +## Usage + +```javascript +var FLOAT16_CATALAN = require( '@stdlib/constants/float16/catalan' ); +``` + +#### FLOAT16_CATALAN + +[Catalan's constant][catalan-constant]. + +```javascript +var bool = ( FLOAT16_CATALAN === 0.916015625 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var FLOAT16_CATALAN = require( '@stdlib/constants/float16/catalan' ); + +console.log( FLOAT16_CATALAN ); +// => 0.916015625 +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/constants/float16/catalan.h" +``` + +#### STDLIB_CONSTANT_FLOAT16_CATALAN + +Macro for [Catalan's constant][catalan-constant]. + +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/docs/repl.txt b/lib/node_modules/@stdlib/constants/float16/catalan/docs/repl.txt new file mode 100644 index 000000000000..8efd35fe8bd2 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/catalan/docs/repl.txt @@ -0,0 +1,12 @@ + +{{alias}} + Catalan's constant. + + Examples + -------- + > {{alias}} + 0.916015625 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/catalan/docs/types/index.d.ts new file mode 100644 index 000000000000..126490b3362a --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/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 = FLOAT16_CATALAN; +* // returns 0.916015625 +*/ +declare const FLOAT16_CATALAN: number; + + +// EXPORTS // + +export = FLOAT16_CATALAN; diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/catalan/docs/types/test.ts new file mode 100644 index 000000000000..f2e8e484f9da --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/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 FLOAT16_CATALAN = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT16_CATALAN; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/examples/index.js b/lib/node_modules/@stdlib/constants/float16/catalan/examples/index.js new file mode 100644 index 000000000000..4e55069b7b7e --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/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 FLOAT16_CATALAN = require( './../lib' ); + +console.log( FLOAT16_CATALAN ); +// => 0.916015625 diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/lib/index.js b/lib/node_modules/@stdlib/constants/float16/catalan/lib/index.js new file mode 100644 index 000000000000..7f12f624ef1a --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/catalan/lib/index.js @@ -0,0 +1,49 @@ +/** +* @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/float16/catalan +* @type {number} +* +* @example +* var FLOAT16_CATALAN = require( '@stdlib/constants/float16/catalan' ); +* // returns 0.916015625 +*/ + + +// MAIN // + +/** +* Catalan's constant. +* +* @constant +* @type {number} +* @default 0.916015625 +* @see [OEIS]{@link http://oeis.org/A006752} +* @see [Wikipedia]{@link https://en.wikipedia.org/wiki/Catalan%27s_constant} +*/ +var FLOAT16_CATALAN = 0.916015625; + + +// EXPORTS // + +module.exports = FLOAT16_CATALAN; diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/package.json b/lib/node_modules/@stdlib/constants/float16/catalan/package.json new file mode 100644 index 000000000000..88271b1a0caa --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/catalan/package.json @@ -0,0 +1,71 @@ +{ + "name": "@stdlib/constants/float16/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", + "float16" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/test/test.js b/lib/node_modules/@stdlib/constants/float16/catalan/test/test.js new file mode 100644 index 000000000000..e152ecc19bf2 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/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 FLOAT16_CATALAN = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT16_CATALAN, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'the exported value is a half-precision floating-point number equal to 0.916015625', function test( t ) { + t.strictEqual( FLOAT16_CATALAN, 0.916015625, 'returns expected value' ); + t.end(); +}); From 184df5b8e12bd69b8b6b4998699951b21a919f94 Mon Sep 17 00:00:00 2001 From: NEERAJ Date: Sat, 6 Dec 2025 21:54:51 +0530 Subject: [PATCH 2/4] chore: clean up --- .../@stdlib/constants/float16/catalan/package.json | 1 - .../@stdlib/number/float64/base/to-float16/lib/i.js | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/package.json b/lib/node_modules/@stdlib/constants/float16/catalan/package.json index 88271b1a0caa..ad5a7f9d19f6 100644 --- a/lib/node_modules/@stdlib/constants/float16/catalan/package.json +++ b/lib/node_modules/@stdlib/constants/float16/catalan/package.json @@ -17,7 +17,6 @@ "directories": { "doc": "./docs", "example": "./examples", - "include": "./include", "lib": "./lib", "test": "./test" }, diff --git a/lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js b/lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js new file mode 100644 index 000000000000..923881ebc3a2 --- /dev/null +++ b/lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js @@ -0,0 +1,3 @@ +var float64ToFloat16 = require( '@stdlib/number/float64/base/to-float16' ); + +console.log( float64ToFloat16( 0.915965594177219 ) ); \ No newline at end of file From 3f348d0a4eb9fa625e0f2512b7e46eac4fe53e22 Mon Sep 17 00:00:00 2001 From: NEERAJ Date: Sat, 6 Dec 2025 21:58:35 +0530 Subject: [PATCH 3/4] chore: reverting unwanted change --- .../@stdlib/number/float64/base/to-float16/lib/i.js | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js diff --git a/lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js b/lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js deleted file mode 100644 index 923881ebc3a2..000000000000 --- a/lib/node_modules/@stdlib/number/float64/base/to-float16/lib/i.js +++ /dev/null @@ -1,3 +0,0 @@ -var float64ToFloat16 = require( '@stdlib/number/float64/base/to-float16' ); - -console.log( float64ToFloat16( 0.915965594177219 ) ); \ No newline at end of file From fa7407674f163c4f983112871c0819c537f28f4d Mon Sep 17 00:00:00 2001 From: NEERAJ Date: Sun, 7 Dec 2025 09:43:20 +0530 Subject: [PATCH 4/4] chore: updating markdown --- .../constants/float16/catalan/README.md | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/catalan/README.md b/lib/node_modules/@stdlib/constants/float16/catalan/README.md index e991c3e6066e..4ad0fad97aa2 100644 --- a/lib/node_modules/@stdlib/constants/float16/catalan/README.md +++ b/lib/node_modules/@stdlib/constants/float16/catalan/README.md @@ -62,60 +62,6 @@ console.log( FLOAT16_CATALAN ); - - -* * * - -
- -## C APIs - - - -
- -
- - - - - -
- -### Usage - -```c -#include "stdlib/constants/float16/catalan.h" -``` - -#### STDLIB_CONSTANT_FLOAT16_CATALAN - -Macro for [Catalan's constant][catalan-constant]. - -
- - - - - -
- -
- - - - - -
- -
- - - -
- - -