From 797c232ebac3f8c8b03cc1a02cd5feb2b7176fe1 Mon Sep 17 00:00:00 2001 From: sagar7162 Date: Thu, 11 Dec 2025 20:31:32 +0530 Subject: [PATCH 1/4] feat: add `constants/float16/sqrt-two-pi` --- 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 --- --- .../constants/float16/sqrt-two-pi/README.md | 97 +++++++++++++++++++ .../float16/sqrt-two-pi/docs/repl.txt | 12 +++ .../float16/sqrt-two-pi/docs/types/index.d.ts | 33 +++++++ .../float16/sqrt-two-pi/docs/types/test.ts | 28 ++++++ .../float16/sqrt-two-pi/examples/index.js | 24 +++++ .../float16/sqrt-two-pi/lib/index.js | 47 +++++++++ .../float16/sqrt-two-pi/package.json | 68 +++++++++++++ .../float16/sqrt-two-pi/test/test.js | 38 ++++++++ 8 files changed, 347 insertions(+) create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/examples/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/lib/index.js create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/package.json create mode 100644 lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/test/test.js diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md new file mode 100644 index 000000000000..c65eada20620 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md @@ -0,0 +1,97 @@ + + +# FLOAT16_SQRT_TWO_PI + +> Square root of the mathematical constant [π][@stdlib/constants/float16/pi] times 2 as a half-precision floating-point number. + +
+ +## Usage + +```javascript +var FLOAT16_SQRT_TWO_PI = require( '@stdlib/constants/float16/sqrt-two-pi' ); +``` + +#### FLOAT16_SQRT_TWO_PI + +Square root of the mathematical constant [π][@stdlib/constants/float16/pi] times `2` as a half-precision floating-point number. + +```javascript +var bool = ( FLOAT16_SQRT_TWO_PI === 2.505859375 ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var FLOAT16_SQRT_TWO_PI = require( '@stdlib/constants/float16/sqrt-two-pi' ); + +console.log( FLOAT16_SQRT_TWO_PI ); +// => 2.505859375 +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/repl.txt b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/repl.txt new file mode 100644 index 000000000000..9b4670f53f51 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/repl.txt @@ -0,0 +1,12 @@ + +{{alias}} + Square root of the `π` times `2` as half-precision floating-point number. + + Examples + -------- + > {{alias}} + 2.505859375 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/types/index.d.ts new file mode 100644 index 000000000000..d3e6473f9cd0 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/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 + +/** +* Square root of the mathematical constant `π` times `2` as a half-precision floating-point number. +* +* @example +* var val = FLOAT16_SQRT_TWO_PI; +* // returns 2.505859375 +*/ +declare const FLOAT16_SQRT_TWO_PI: number; + + +// EXPORTS // + +export = FLOAT16_SQRT_TWO_PI; diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/docs/types/test.ts new file mode 100644 index 000000000000..b5317d75f3cb --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/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_SQRT_TWO_PI = require( './index' ); + + +// TESTS // + +// The export is a number... +{ + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + FLOAT16_SQRT_TWO_PI; // $ExpectType number +} diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/examples/index.js b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/examples/index.js new file mode 100644 index 000000000000..4d2c1c0b7804 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/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_SQRT_TWO_PI = require( './../lib' ); + +console.log( FLOAT16_SQRT_TWO_PI ); +// => 2.505859375 diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/lib/index.js b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/lib/index.js new file mode 100644 index 000000000000..04dd98b69971 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/lib/index.js @@ -0,0 +1,47 @@ +/** +* @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'; + +/** +* Square root of the mathematical constant `π` times `2` as a half-precision floating-point number. +* +* @module @stdlib/constants/float16/sqrt-two-pi +* @type {number} +* +* @example +* var FLOAT16_SQRT_TWO_PI = require( '@stdlib/constants/float16/sqrt-two-pi' ); +* // returns 2.505859375 +*/ + +// MAIN // + +/** +* Square root of the mathematical constant `π` times `2` as a half-precision floating-point number. +* +* @constant +* @type {number} +* @default 2.505859375 +* @see [Wikipedia]{@link https://en.wikipedia.org/wiki/Pi} +*/ +var FLOAT16_SQRT_TWO_PI = 2.505859375; + + +// EXPORTS // + +module.exports = FLOAT16_SQRT_TWO_PI; diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/package.json b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/package.json new file mode 100644 index 000000000000..f11913a78fdd --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/package.json @@ -0,0 +1,68 @@ +{ + "name": "@stdlib/constants/float16/sqrt-two-pi", + "version": "0.0.0", + "description": "Square root of 2π as a 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", + "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", + "pi", + "2pi", + "sqrt", + "square", + "root", + "ieee754", + "float", + "half", + "floating-point", + "float16" + ] +} diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/test/test.js b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/test/test.js new file mode 100644 index 000000000000..d1ad075b31b3 --- /dev/null +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/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_SQRT_TWO_PI = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a number', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof FLOAT16_SQRT_TWO_PI, 'number', 'main export is a number' ); + t.end(); +}); + +tape( 'the exported value is a half-precision floating-point number equal to square root of the `π` times `2`', function test( t ) { + t.strictEqual( FLOAT16_SQRT_TWO_PI, 2.505859375, 'returns expected value' ); + t.end(); +}); From d3ce1d83cfc9e4da9d6c63ce885283249a7963a4 Mon Sep 17 00:00:00 2001 From: Sagar Ratna Chaudhary <161244282+sagar7162@users.noreply.github.com> Date: Thu, 11 Dec 2025 21:04:46 +0530 Subject: [PATCH 2/4] fix: Apply suggestions from code review Co-authored-by: Neeraj Pathak Signed-off-by: Sagar Ratna Chaudhary <161244282+sagar7162@users.noreply.github.com> --- .../@stdlib/constants/float16/sqrt-two-pi/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md index c65eada20620..d3dba6127fa7 100644 --- a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md @@ -66,14 +66,6 @@ console.log( FLOAT16_SQRT_TWO_PI ); From 0feef03dfef1cb9465e576a4b3bff2b6a5d09b25 Mon Sep 17 00:00:00 2001 From: Sagar Ratna Chaudhary <161244282+sagar7162@users.noreply.github.com> Date: Thu, 11 Dec 2025 21:09:23 +0530 Subject: [PATCH 3/4] fix: Update README to remove related links Removed links to float32 and float64 sqrt-two-pi constants. Signed-off-by: Sagar Ratna Chaudhary <161244282+sagar7162@users.noreply.github.com> --- .../@stdlib/constants/float16/sqrt-two-pi/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md index d3dba6127fa7..7be6a7451a8c 100644 --- a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md @@ -78,10 +78,6 @@ console.log( FLOAT16_SQRT_TWO_PI ); -[@stdlib/constants/float32/sqrt-two-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/sqrt-two-pi - -[@stdlib/constants/float64/sqrt-two-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float64/sqrt-two-pi - From d3a553ce7ceee4928e62399b7a83afcf00ad1ee0 Mon Sep 17 00:00:00 2001 From: Sagar Ratna Chaudhary <161244282+sagar7162@users.noreply.github.com> Date: Thu, 11 Dec 2025 21:29:18 +0530 Subject: [PATCH 4/4] fix: Apply suggestion from @Neerajpathak07 Co-authored-by: Neeraj Pathak Signed-off-by: Sagar Ratna Chaudhary <161244282+sagar7162@users.noreply.github.com> --- .../@stdlib/constants/float16/sqrt-two-pi/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md index 7be6a7451a8c..c7a039451130 100644 --- a/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md +++ b/lib/node_modules/@stdlib/constants/float16/sqrt-two-pi/README.md @@ -76,10 +76,6 @@ console.log( FLOAT16_SQRT_TWO_PI ); [@stdlib/constants/float16/pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float16/pi - - - -