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(); +});