From 0809ce297db46c81646ffb12f0a590c141f907b2 Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Wed, 7 Jan 2026 19:16:00 +0000 Subject: [PATCH 1/6] feat: add @stdlib/constants/float16/fourth-root-eps --- 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 --- --- .../float16/fourth-root-eps/README.md | 135 ++++++++++++++++++ .../float16/fourth-root-eps/docs/repl.txt | 10 ++ .../fourth-root-eps/docs/types/index.d.ts | 33 +++++ .../fourth-root-eps/docs/types/test.ts | 28 ++++ .../float16/fourth-root-eps/examples/index.js | 24 ++++ .../constants/float16/fourth-root-eps.h | 27 ++++ .../float16/fourth-root-eps/lib/index.js | 53 +++++++ .../float16/fourth-root-eps/manifest.json | 36 +++++ .../float16/fourth-root-eps/package.json | 72 ++++++++++ .../float16/fourth-root-eps/test/test.js | 42 ++++++ 10 files changed, 460 insertions(+) create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/examples/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/lib/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/test/test.js 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..f048799b6bcb --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md @@ -0,0 +1,135 @@ + + +# 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 [single-precision floating-point epsilon][@stdlib/constants/float16/eps]. + +```javascript +var bool = ( FLOAT16_FOURTH_ROOT_EPS === 0.1767578125 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + +```javascript +var FLOAT16_FOURTH_ROOT_EPS = require( '@stdlib/constants/float16/fourth-root-eps' ); + +var out = FLOAT16_FOURTH_ROOT_EPS; +// returns 0.1767578125 +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/constants/float16/fourth_root_eps.h" +``` + +#### STDLIB_CONSTANT_FLOAT16_FOURTH_ROOT_EPS + +Macro for the [Fourth root][nth-root] of [half-precision floating-point epsilon][@stdlib/constants/float16/eps]. + +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + 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..b68ad3467949 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/docs/repl.txt @@ -0,0 +1,10 @@ +{{alias}} + Fourth root of half-precision floating-point epsilon. + + Examples + -------- + > {{alias}} + 0.1767578125 + + 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..4fbc02e46644 --- /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) 2026 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.1767578125 +*/ +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..b0553c26c5f2 --- /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) 2026 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..fb9f03960ce8 --- /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) 2026 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.1767578125 diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h new file mode 100644 index 000000000000..e00e55ab5cd6 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h @@ -0,0 +1,27 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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_FOURTH_ROOT_EPS_H +#define STDLIB_CONSTANTS_FLOAT16_FOURTH_ROOT_EPS_H + +/** +* Macro for the fourth root of half-precision floating-point epsilon. +*/ +#define STDLIB_CONSTANT_FLOAT16_FOURTH_ROOT_EPS 0.1767578125f + +#endif /* !STDLIB_CONSTANTS_FLOAT16_FOURTH_ROOT_EPS_H */ 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..90e9d0f07eaa --- /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) 2026 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.1767578125 +*/ + + +// MAIN // + +/** +* Fourth root of half-precision floating-point epsilon. +* +* ```tex +* \sqrt{\sqrt{\frac{1}{2^{10}}}} +* ``` +* +* @constant +* @type {number} +* @default 0.1767578125 +* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985} +* @see [Machine Epsilon]{@link https://en.wikipedia.org/wiki/Machine_epsilon} +*/ +var FLOAT16_FOURTH_ROOT_EPS = 0.1767578125; + + +// EXPORTS // + +module.exports = FLOAT16_FOURTH_ROOT_EPS; diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/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/fourth-root-eps/package.json b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json new file mode 100644 index 000000000000..d3cf21ec8636 --- /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", + "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", + "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..c7cfa67c0104 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/test/test.js @@ -0,0 +1,42 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 sqrtf = require( '@stdlib/math/base/special/sqrtf' ); +var float64ToFloat16 = require( '@stdlib/number/float64/base/to-float16' ); +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 half-precision floating-point number (2**-10)', function test( t ) { + var expected = sqrtf( sqrtf( float64ToFloat16( pow( 2.0, -10.0 ) ) ) ); + t.strictEqual( FLOAT16_FOURTH_ROOT_EPS, expected, 'returns expected value' ); + t.end(); +}); From f3a7bbc7825611f87851aac3977de113e6a4b838 Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Wed, 7 Jan 2026 19:31:41 +0000 Subject: [PATCH 2/6] feat: add @stdlib/constants/float16/fourth-root-eps --- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed --- --- .../@stdlib/constants/float16/fourth-root-eps/test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index c7cfa67c0104..ac29fadcca78 100644 --- 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 @@ -36,7 +36,7 @@ tape( 'main export is a number', function test( t ) { }); 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 half-precision floating-point number (2**-10)', function test( t ) { - var expected = sqrtf( sqrtf( float64ToFloat16( pow( 2.0, -10.0 ) ) ) ); + var expected = float64ToFloat16(sqrtf(sqrtf(float64ToFloat16( pow( 2.0, -10.0 ) )))); t.strictEqual( FLOAT16_FOURTH_ROOT_EPS, expected, 'returns expected value' ); t.end(); }); From a81b32ede61497ed992d60da4230052968ccc18d Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Mon, 12 Jan 2026 19:04:08 +0000 Subject: [PATCH 3/6] fix: refine float16 fourth-root-eps tests and docs --- 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: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed --- --- .../float16/fourth-root-eps/README.md | 2 +- .../constants/float16/fourth-root-eps.h | 27 -------------- .../float16/fourth-root-eps/manifest.json | 36 ------------------- .../float16/fourth-root-eps/test/test.js | 6 ++-- 4 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h delete mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json 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 index f048799b6bcb..3a1ee9d88abc 100644 --- a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md @@ -32,7 +32,7 @@ var FLOAT16_FOURTH_ROOT_EPS = require( '@stdlib/constants/float16/fourth-root-ep #### FLOAT16_FOURTH_ROOT_EPS -[Fourth root][nth-root] of [single-precision floating-point epsilon][@stdlib/constants/float16/eps]. +[Fourth root][nth-root] of [half-precision floating-point epsilon][@stdlib/constants/float16/eps]. ```javascript var bool = ( FLOAT16_FOURTH_ROOT_EPS === 0.1767578125 ); diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h deleted file mode 100644 index e00e55ab5cd6..000000000000 --- a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth-root-eps.h +++ /dev/null @@ -1,27 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2026 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_FOURTH_ROOT_EPS_H -#define STDLIB_CONSTANTS_FLOAT16_FOURTH_ROOT_EPS_H - -/** -* Macro for the fourth root of half-precision floating-point epsilon. -*/ -#define STDLIB_CONSTANT_FLOAT16_FOURTH_ROOT_EPS 0.1767578125f - -#endif /* !STDLIB_CONSTANTS_FLOAT16_FOURTH_ROOT_EPS_H */ diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json deleted file mode 100644 index 844d692f6439..000000000000 --- a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "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/fourth-root-eps/test/test.js b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/test/test.js index ac29fadcca78..916a73c2da52 100644 --- 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 @@ -22,7 +22,7 @@ var tape = require( 'tape' ); var pow = require( '@stdlib/math/base/special/pow' ); -var sqrtf = require( '@stdlib/math/base/special/sqrtf' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); var float64ToFloat16 = require( '@stdlib/number/float64/base/to-float16' ); var FLOAT16_FOURTH_ROOT_EPS = require( './../lib' ); @@ -35,8 +35,8 @@ tape( 'main export is a number', function test( t ) { 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 half-precision floating-point number (2**-10)', function test( t ) { - var expected = float64ToFloat16(sqrtf(sqrtf(float64ToFloat16( pow( 2.0, -10.0 ) )))); +tape( 'the exported value equals the fourth root of half-precision floating-point epsilon', function test( t ) { + var expected = float64ToFloat16(sqrt(sqrt(pow( 2.0, -10.0 )))); t.strictEqual( FLOAT16_FOURTH_ROOT_EPS, expected, 'returns expected value' ); t.end(); }); From 9586415a2bab4b13ba6e0df8d2f4786375da0187 Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Mon, 12 Jan 2026 19:09:23 +0000 Subject: [PATCH 4/6] fix: refine float16 fourth-root-eps tests and docs --- 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: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: na - task: lint_license_headers status: passed --- --- .../@stdlib/constants/float16/fourth-root-eps/package.json | 1 - 1 file changed, 1 deletion(-) 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 index d3cf21ec8636..db809911111b 100644 --- a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json @@ -17,7 +17,6 @@ "directories": { "doc": "./docs", "example": "./examples", - "include": "./include", "lib": "./lib", "test": "./test" }, From 1520f85669dfb93981b18be9463ca731dfd599e7 Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Fri, 16 Jan 2026 18:19:59 +0000 Subject: [PATCH 5/6] fix: update float16 fourth-root-eps documentation --- 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: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed --- --- .../float16/fourth-root-eps/README.md | 2 +- .../stdlib/constants/float16/exponent_mask.h | 27 ++++++++++++++ .../float16/fourth-root-eps/manifest.json | 36 +++++++++++++++++++ .../float16/fourth-root-eps/package.json | 1 + .../float16/fourth-root-eps/test/test.js | 4 +-- 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/exponent_mask.h create mode 100644 lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json 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 index 3a1ee9d88abc..5691626e756e 100644 --- a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/README.md @@ -88,7 +88,7 @@ var out = FLOAT16_FOURTH_ROOT_EPS; #### STDLIB_CONSTANT_FLOAT16_FOURTH_ROOT_EPS -Macro for the [Fourth root][nth-root] of [half-precision floating-point epsilon][@stdlib/constants/float16/eps]. +Macro for the [fourth root][nth-root] of [half-precision floating-point epsilon][@stdlib/constants/float16/eps]. diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/exponent_mask.h b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/exponent_mask.h new file mode 100644 index 000000000000..e00e55ab5cd6 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/exponent_mask.h @@ -0,0 +1,27 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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_FOURTH_ROOT_EPS_H +#define STDLIB_CONSTANTS_FLOAT16_FOURTH_ROOT_EPS_H + +/** +* Macro for the fourth root of half-precision floating-point epsilon. +*/ +#define STDLIB_CONSTANT_FLOAT16_FOURTH_ROOT_EPS 0.1767578125f + +#endif /* !STDLIB_CONSTANTS_FLOAT16_FOURTH_ROOT_EPS_H */ diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/manifest.json new file mode 100644 index 000000000000..844d692f6439 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/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/fourth-root-eps/package.json b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json index db809911111b..d3cf21ec8636 100644 --- a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json +++ b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/package.json @@ -17,6 +17,7 @@ "directories": { "doc": "./docs", "example": "./examples", + "include": "./include", "lib": "./lib", "test": "./test" }, 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 index 916a73c2da52..84be4cf21fc0 100644 --- 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 @@ -35,8 +35,8 @@ tape( 'main export is a number', function test( t ) { t.end(); }); -tape( 'the exported value equals the fourth root of half-precision floating-point epsilon', function test( t ) { - var expected = float64ToFloat16(sqrt(sqrt(pow( 2.0, -10.0 )))); +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 stdlib_float16_t (2**-10)', function test( t ) { + var expected = float64ToFloat16( sqrt( sqrt( pow( 2.0, -10.0 ) ) ) ); t.strictEqual( FLOAT16_FOURTH_ROOT_EPS, expected, 'returns expected value' ); t.end(); }); From 811b7c86ef4f60af791cf3aa0b75113f323d86cf Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Fri, 16 Jan 2026 18:21:57 +0000 Subject: [PATCH 6/6] fix: update float16 fourth-root-eps documentation --- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: na - task: lint_license_headers status: passed --- --- .../constants/float16/{exponent_mask.h => fourth_root_eps.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/{exponent_mask.h => fourth_root_eps.h} (100%) diff --git a/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/exponent_mask.h b/lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth_root_eps.h similarity index 100% rename from lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/exponent_mask.h rename to lib/node_modules/@stdlib/constants/float16/fourth-root-eps/include/stdlib/constants/float16/fourth_root_eps.h