From c9b4bf37000bdd630e2bd2a6c3c2eec742fc9b37 Mon Sep 17 00:00:00 2001 From: DeLaCruz Date: Sat, 20 Dec 2025 00:35:37 +0530 Subject: [PATCH 1/4] feat: add constants/float16/nan --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/constants/float16/nan/README.md | 81 +++++++++++++++++++ .../constants/float16/nan/docs/repl.txt | 12 +++ .../float16/nan/docs/types/index.d.ts | 33 ++++++++ .../constants/float16/nan/docs/types/test.ts | 28 +++++++ .../constants/float16/nan/examples/index.js | 24 ++++++ .../constants/float16/nan/lib/index.js | 48 +++++++++++ .../constants/float16/nan/package.json | 65 +++++++++++++++ .../constants/float16/nan/test/test.js | 39 +++++++++ 8 files changed, 330 insertions(+) create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/README.md create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/examples/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/lib/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/package.json create mode 100644 lib/node_modules/@stdlib/constants/float16/nan/test/test.js diff --git a/lib/node_modules/@stdlib/constants/float16/nan/README.md b/lib/node_modules/@stdlib/constants/float16/nan/README.md new file mode 100644 index 000000000000..d7b3abc69972 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/README.md @@ -0,0 +1,81 @@ + + +# NAN + +> [Half-precision floating-point][ieee754] `NaN`. + +
+ +## Usage + +```javascript +var FLOAT16_NAN = require( '@stdlib/constants/float16/nan' ); +``` + +#### FLOAT16_NAN + +[Half-precision floating-point][ieee754] `NaN`. + +```javascript +var bool = ( FLOAT16_NAN !== FLOAT16_NAN ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var FLOAT16_NAN = require( '@stdlib/constants/float16/nan' ); + +console.log( FLOAT16_NAN ); +// => NaN +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float16/nan/docs/repl.txt b/lib/node_modules/@stdlib/constants/float16/nan/docs/repl.txt new file mode 100644 index 000000000000..7da677b9bd07 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/docs/repl.txt @@ -0,0 +1,12 @@ + +{{alias}} + Half-precision floating-point NaN. + + Examples + -------- + > {{alias}} + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts new file mode 100644 index 000000000000..f79bc1692458 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts @@ -0,0 +1,33 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 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 + +/** +* Half-precision floating-point NaN. +* +* @example +* var nan = FLOAT16_NAN; +* // returns NaN +*/ +declare const FLOAT16_NAN: number; + + +// EXPORTS // + +export = FLOAT16_NAN; diff --git a/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts new file mode 100644 index 000000000000..e15e2b1c7c56 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts @@ -0,0 +1,28 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 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_NAN = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT16_NAN; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js b/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js new file mode 100644 index 000000000000..6332f97f73a7 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js @@ -0,0 +1,24 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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_NAN = require( './../lib' ); + +console.log( FLOAT16_NAN ); +// => NaN diff --git a/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js b/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js new file mode 100644 index 000000000000..2398e865b9fa --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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'; + +/** +* Half-precision floating-point NaN. +* +* @module @stdlib/constants/float16/nan +* @type {number} +* +* @example +* var FLOAT16_NAN = require( '@stdlib/constants/float16/nan' ); +* // returns NaN +*/ + + +// MAIN // + +/** +* Half-precision floating-point NaN. +* +* @constant +* @type {number} +* @default NaN +* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985} +*/ +var FLOAT16_NAN = NaN; + + +// EXPORTS // + +module.exports = FLOAT16_NAN; diff --git a/lib/node_modules/@stdlib/constants/float16/nan/package.json b/lib/node_modules/@stdlib/constants/float16/nan/package.json new file mode 100644 index 000000000000..154cb47e9aa4 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/package.json @@ -0,0 +1,65 @@ +{ + "name": "@stdlib/constants/float16/nan", + "version": "0.0.0", + "description": "Half-precision floating-point NaN.", + "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", + "nan", + "ieee754", + "float", + "precision", + "floating-point", + "float16" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float16/nan/test/test.js b/lib/node_modules/@stdlib/constants/float16/nan/test/test.js new file mode 100644 index 000000000000..dca64dcef1af --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/nan/test/test.js @@ -0,0 +1,39 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var FLOAT16_NAN = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT16_NAN, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'export is equal to NaN', function test( t ) { + t.strictEqual( isnanf( FLOAT16_NAN ), true, 'returns expected value' ); + t.end(); +}); From 56d6e9941d2a8838431aba8145c581a9ffb0ea36 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 26 Dec 2025 16:57:18 -0800 Subject: [PATCH 2/4] test: avoid using 32-bit assertion utility Signed-off-by: Athan --- lib/node_modules/@stdlib/constants/float16/nan/test/test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/nan/test/test.js b/lib/node_modules/@stdlib/constants/float16/nan/test/test.js index dca64dcef1af..7836bcd1ca3a 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/test/test.js +++ b/lib/node_modules/@stdlib/constants/float16/nan/test/test.js @@ -21,7 +21,6 @@ // MODULES // var tape = require( 'tape' ); -var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var FLOAT16_NAN = require( './../lib' ); @@ -34,6 +33,6 @@ tape( 'main export is a number', function test( t ) { }); tape( 'export is equal to NaN', function test( t ) { - t.strictEqual( isnanf( FLOAT16_NAN ), true, 'returns expected value' ); + t.notEqual( FLOAT16_NAN, FLOAT16_NAN, 'returns expected value' ); t.end(); }); From bdb62a3a99727b57617a20f4e68322fb42a4411c Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Sat, 27 Dec 2025 01:00:44 +0000 Subject: [PATCH 3/4] chore: update copyright years --- lib/node_modules/@stdlib/constants/float16/nan/README.md | 2 +- .../@stdlib/constants/float16/nan/docs/types/index.d.ts | 2 +- .../@stdlib/constants/float16/nan/docs/types/test.ts | 2 +- .../@stdlib/constants/float16/nan/examples/index.js | 2 +- lib/node_modules/@stdlib/constants/float16/nan/lib/index.js | 2 +- lib/node_modules/@stdlib/constants/float16/nan/test/test.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/nan/README.md b/lib/node_modules/@stdlib/constants/float16/nan/README.md index d7b3abc69972..e8dcec5b7c15 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/README.md +++ b/lib/node_modules/@stdlib/constants/float16/nan/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2024 The Stdlib Authors. +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. diff --git a/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts index f79bc1692458..9d10a68d804e 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts index e15e2b1c7c56..9e9ca5ccf3fe 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/float16/nan/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js b/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js index 6332f97f73a7..d50cd4e87ba7 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js +++ b/lib/node_modules/@stdlib/constants/float16/nan/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js b/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js index 2398e865b9fa..a02eff69b9bc 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js +++ b/lib/node_modules/@stdlib/constants/float16/nan/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/constants/float16/nan/test/test.js b/lib/node_modules/@stdlib/constants/float16/nan/test/test.js index 7836bcd1ca3a..29c8d2f097da 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/test/test.js +++ b/lib/node_modules/@stdlib/constants/float16/nan/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. From 15945b9a79c3825bfe2644074b55627186378c92 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 26 Dec 2025 17:05:38 -0800 Subject: [PATCH 4/4] chore: remove directory Signed-off-by: Athan --- lib/node_modules/@stdlib/constants/float16/nan/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/constants/float16/nan/package.json b/lib/node_modules/@stdlib/constants/float16/nan/package.json index 154cb47e9aa4..9dffa4b4206f 100644 --- a/lib/node_modules/@stdlib/constants/float16/nan/package.json +++ b/lib/node_modules/@stdlib/constants/float16/nan/package.json @@ -17,7 +17,6 @@ "directories": { "doc": "./docs", "example": "./examples", - "include": "./include", "lib": "./lib", "test": "./test" },