diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md new file mode 100644 index 000000000000..31a28d917212 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md @@ -0,0 +1,78 @@ + + +# FLOAT16_FOURTH_ROOT_EPS + +> [Fourth root][nth-root] of [half-precision floating-point epsilon][@stdlib/constants/float16/eps]. + +
+ +## Usage + +```javascript +var FLOAT16_FOURTH_ROOT_EPS = require( '@stdlib/constants/float16/fourth-root-eps' ); +``` + +#### FLOAT16_FOURTH_ROOT_EPS + +[Fourth root][nth-root] of [half-precision floating-point epsilon][@stdlib/constants/float16/eps]. + +```javascript +var bool = ( FLOAT16_FOURTH_ROOT_EPS === 0.1767766952966369 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + +```javascript +var FLOAT16_FOURTH_ROOT_EPS = require( '@stdlib/constants/float16/fourth-root-eps' ); + +var out = FLOAT16_FOURTH_ROOT_EPS; +// returns 0.1767766952966369 +``` + +
+ + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/repl.txt b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/repl.txt new file mode 100644 index 000000000000..e4d51e9977b6 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/repl.txt @@ -0,0 +1,11 @@ + +{{alias}} + Fourth root of half-precision floating-point epsilon. + + Examples + -------- + > {{alias}} + 0.1767766952966369 + + See Also + -------- diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/types/index.d.ts new file mode 100644 index 000000000000..83a387057831 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/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 + +/** +* Fourth root of half-precision floating-point epsilon. +* +* @example +* var eps = FLOAT16_FOURTH_ROOT_EPS; +* // returns 0.1767766952966369 +*/ +declare const FLOAT16_FOURTH_ROOT_EPS: number; + + +// EXPORTS // + +export = FLOAT16_FOURTH_ROOT_EPS; diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/types/test.ts new file mode 100644 index 000000000000..92afae54438c --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/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_FOURTH_ROOT_EPS = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT16_FOURTH_ROOT_EPS; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/examples/index.js b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/examples/index.js new file mode 100644 index 000000000000..ea153c4c2dd0 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/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_FOURTH_ROOT_EPS = require( './../lib' ); + +console.log( FLOAT16_FOURTH_ROOT_EPS ); +// => 0.1767766952966369 diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/lib/index.js b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/lib/index.js new file mode 100644 index 000000000000..bb7e0bdd0dd9 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/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'; + +/** +* Fourth root of half-precision floating-point epsilon. +* +* @module @stdlib/constants/float16/fourth-root-eps +* @type {number} +* +* @example +* var FLOAT16_FOURTH_ROOT_EPS = require( '@stdlib/constants/float16/fourth-root-eps' ); +* // returns 0.1767766952966369 +*/ + + +// MAIN // + +/** +* Fourth root of half-precision floating-point epsilon. +* +* ```tex +* \sqrt{\sqrt{\frac{1}{2^{10}}}} +* ``` +* +* @constant +* @type {number} +* @default 0.1767766952966369 +* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985} +* @see [Half-precision floating-point format]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format} +*/ +var FLOAT16_FOURTH_ROOT_EPS = 0.1767766952966369; + + +// EXPORTS // + +module.exports = FLOAT16_FOURTH_ROOT_EPS; diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json new file mode 100644 index 000000000000..55938560e983 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json @@ -0,0 +1,72 @@ +{ + "name": "@stdlib/constants/float16/fourth-root-eps", + "version": "0.0.0", + "description": "Fourth root of half-precision floating-point epsilon.", + "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", + "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", + "double", + "dbl", + "floating-point", + "float", + "float16", + "16bit", + "16-bit", + "ieee754", + "epsilon", + "eps", + "number", + "sqrt", + "fourth", + "root" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/test/test.js b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/test/test.js new file mode 100644 index 000000000000..d9de55746ede --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/test/test.js @@ -0,0 +1,41 @@ +/** +* @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 pow = require( '@stdlib/math/base/special/pow' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var FLOAT16_FOURTH_ROOT_EPS = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT16_FOURTH_ROOT_EPS, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'the exported value equals the fourth root of the difference between one and the smallest value greater than one which is representable as a double (2**-10)', function test( t ) { + var expected = sqrt( sqrt( pow( 2, -10 ) ) ); + t.equal( FLOAT16_FOURTH_ROOT_EPS, expected, 'equals sqrt( sqrt(2**-10) )' ); + t.end(); +});