From 1e9ad7552aaedff3bbef3d608ad7cdfc3b6dc81f Mon Sep 17 00:00:00 2001 From: NEERAJ Date: Thu, 11 Dec 2025 22:21:18 +0530 Subject: [PATCH 1/2] feat: adding inital files --- .../min-base2-exponent-subnormal/README.md | 139 ++++++++++++++++++ .../docs/repl.txt | 13 ++ .../docs/types/index.d.ts | 33 +++++ .../docs/types/test.ts | 28 ++++ .../examples/index.js | 24 +++ .../float16/min_base2_exponent_subnormal.h | 27 ++++ .../min-base2-exponent-subnormal/lib/index.js | 54 +++++++ .../manifest.json | 36 +++++ .../min-base2-exponent-subnormal/package.json | 71 +++++++++ .../min-base2-exponent-subnormal/test/test.js | 38 +++++ 10 files changed, 463 insertions(+) create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/include/stdlib/constants/float16/min_base2_exponent_subnormal.h create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/manifest.json create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/package.json create mode 100644 lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/test/test.js diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md new file mode 100644 index 000000000000..8330732d13c7 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md @@ -0,0 +1,139 @@ + + +# FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL + +> The minimum biased base 2 exponent for a subnormal [half-precision floating-point number][ieee754]. + +
+ +## Usage + + + +```javascript +var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float16/min-base2-exponent-subnormal' ); +``` + +#### FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL + +The minimum biased base 2 exponent for a subnormal [half-precision floating-point number][ieee754]. + + + +```javascript +var bool = ( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL === −24 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float16/min-base2-exponent-subnormal' ); + +console.log( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL ); +// => −24 +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/constants/float16/min_base2_exponent_subnormal.h" +``` + +#### STDLIB_CONSTANT_FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL + +Macro for the minimum biased base 2 exponent for a subnormal [half-precision floating-point number][ieee754]. + +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt new file mode 100644 index 000000000000..73be7186e136 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt @@ -0,0 +1,13 @@ + +{{alias}} + The minimum biased base 2 exponent for a subnormal half-precision + floating-point number. + + Examples + -------- + > {{alias}} + −24 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts new file mode 100644 index 000000000000..12d5e9133c70 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/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 + +/** +* The minimum biased base 2 exponent for a subnormal half-precision floating-point number. +* +* @example +* var min = FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL; +* // returns −24 +*/ +declare const FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL: number; + + +// EXPORTS // + +export = FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL; diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/test.ts new file mode 100644 index 000000000000..3f90b5c21aec --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/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_MIN_BASE2_EXPONENT_SUBNORMAL = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js new file mode 100644 index 000000000000..38f84a2eb3f4 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/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_MIN_BASE2_EXPONENT_SUBNORMAL = require( './../lib' ); + +console.log( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL ); +// => −24 diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/include/stdlib/constants/float16/min_base2_exponent_subnormal.h b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/include/stdlib/constants/float16/min_base2_exponent_subnormal.h new file mode 100644 index 000000000000..8454094e3f8a --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/include/stdlib/constants/float16/min_base2_exponent_subnormal.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_FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL_H +#define STDLIB_CONSTANTS_FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL_H + +/** +* Macro for the minimum biased base 2 exponent for a subnormal half-precision floating-point number. +*/ +#define STDLIB_CONSTANT_FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL -24 + +#endif // !STDLIB_CONSTANTS_FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL_H diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js new file mode 100644 index 000000000000..2cc3f84d5d2a --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js @@ -0,0 +1,54 @@ +/** +* @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'; + +/** +* The minimum biased base 2 exponent for a subnormal half-precision floating-point number. +* +* @module @stdlib/constants/float16/min-base2-exponent-subnormal +* @type {integer32} +* +* @example +* var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float16/min-base2-exponent-subnormal' ); +* // returns −24 +*/ + + +// MAIN // + +/** +* The minimum biased base 2 exponent for a subnormal half-precision floating-point number. +* +* ```text +* -(BIAS+(10-1)) = -(15+9) = −24 +* ``` +* +* where `BIAS = 15` and `10` is the number of digits in the significand. +* +* @constant +* @type {integer32} +* @default -24 +* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985} +*/ +var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = -24|0; // asm type annotation + + +// EXPORTS // + +module.exports = FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL; diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/manifest.json b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/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/float16/min-base2-exponent-subnormal/package.json b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/package.json new file mode 100644 index 000000000000..c3a82b3ab5ab --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/package.json @@ -0,0 +1,71 @@ +{ + "name": "@stdlib/constants/float16/min-base2-exponent-subnormal", + "version": "0.0.0", + "description": "The minimum biased base 2 exponent for a subnormal half-precision floating-point number.", + "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", + "float", + "flt", + "floating-point", + "ieee754", + "bias", + "exponent", + "min", + "minimum", + "binary", + "subnormal", + "denormalized", + "base 2" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/test/test.js b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/test/test.js new file mode 100644 index 000000000000..d418e962cad3 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/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_MIN_BASE2_EXPONENT_SUBNORMAL = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'the exported value is -24', function test( t ) { + t.strictEqual( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL, -24, 'returns expected value' ); + t.end(); +}); From 0f9f3cf9c0e31d752df3f653af80c3656a77571e Mon Sep 17 00:00:00 2001 From: NEERAJ Date: Thu, 11 Dec 2025 22:28:30 +0530 Subject: [PATCH 2/2] chore: clean up --- .../constants/float16/min-base2-exponent-subnormal/README.md | 4 ++-- .../float16/min-base2-exponent-subnormal/docs/repl.txt | 2 +- .../min-base2-exponent-subnormal/docs/types/index.d.ts | 2 +- .../float16/min-base2-exponent-subnormal/examples/index.js | 2 +- .../float16/min-base2-exponent-subnormal/lib/index.js | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md index 8330732d13c7..85482949514b 100644 --- a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/README.md @@ -39,7 +39,7 @@ The minimum biased base 2 exponent for a subnormal [half-precision floating-poin ```javascript -var bool = ( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL === −24 ); +var bool = ( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL === -24 ); // returns true ``` @@ -59,7 +59,7 @@ var bool = ( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL === −24 ); var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float16/min-base2-exponent-subnormal' ); console.log( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL ); -// => −24 +// => -24 ``` diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt index 73be7186e136..319c05c4c2c7 100644 --- a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/repl.txt @@ -6,7 +6,7 @@ Examples -------- > {{alias}} - −24 + -24 See Also -------- diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts index 12d5e9133c70..3e7b15526d52 100644 --- a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/docs/types/index.d.ts @@ -23,7 +23,7 @@ * * @example * var min = FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL; -* // returns −24 +* // returns -24 */ declare const FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL: number; diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js index 38f84a2eb3f4..990df317da66 100644 --- a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/examples/index.js @@ -21,4 +21,4 @@ var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = require( './../lib' ); console.log( FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL ); -// => −24 +// => -24 diff --git a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js index 2cc3f84d5d2a..ade08dd3b3fa 100644 --- a/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js +++ b/lib/node_modules/@stdlib/constants/float16/min-base2-exponent-subnormal/lib/index.js @@ -26,7 +26,7 @@ * * @example * var FLOAT16_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float16/min-base2-exponent-subnormal' ); -* // returns −24 +* // returns -24 */ @@ -36,7 +36,7 @@ * The minimum biased base 2 exponent for a subnormal half-precision floating-point number. * * ```text -* -(BIAS+(10-1)) = -(15+9) = −24 +* -(BIAS+(10-1)) = -(15+9) = -24 * ``` * * where `BIAS = 15` and `10` is the number of digits in the significand.