From 9e62d4b5a88f1575c057398229057552e5c6da00 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Tue, 25 Mar 2025 12:43:41 -0700 Subject: [PATCH] fix: constant value --- 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: 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: na - task: lint_license_headers status: passed --- --- .../float64/max-safe-nth-double-factorial/README.md | 6 +++--- .../float64/max-safe-nth-double-factorial/docs/repl.txt | 2 +- .../max-safe-nth-double-factorial/docs/types/index.d.ts | 2 +- .../float64/max-safe-nth-double-factorial/examples/index.js | 4 ++-- .../constants/float64/max_safe_nth_double_factorial.h | 2 +- .../float64/max-safe-nth-double-factorial/lib/index.js | 6 +++--- .../float64/max-safe-nth-double-factorial/test/test.js | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/README.md b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/README.md index cad0305044c4..42d39f888426 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/README.md +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/README.md @@ -39,7 +39,7 @@ The maximum [safe][safe-integers] nth [double factorial][double-factorial] when ```javascript -var bool = ( FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL === 301 ); +var bool = ( FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL === 300 ); // returns true ``` @@ -58,7 +58,7 @@ var bool = ( FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL === 301 ); ```javascript var FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-double-factorial' ); -function factorial( n ) { +function factorial2( n ) { var a; var i; @@ -72,7 +72,7 @@ function factorial( n ) { var v; var i; for ( i = 0; i < 400; i++ ) { - v = factorial( i ); + v = factorial2( i ); if ( i > FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL ) { console.log( 'Unsafe: %d', v ); } else { diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/repl.txt b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/repl.txt index fbde931d3d08..2daef000563e 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/repl.txt +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/repl.txt @@ -6,7 +6,7 @@ Examples -------- > {{alias}} - 301 + 300 See Also -------- diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/types/index.d.ts index 310031652815..50c30726176f 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/docs/types/index.d.ts @@ -23,7 +23,7 @@ * * @example * var max = FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL; -* // returns 301 +* // returns 300 */ declare const FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL: number; diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/examples/index.js b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/examples/index.js index dc9d2bdf87e3..7a1e59407c9c 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/examples/index.js +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/examples/index.js @@ -20,7 +20,7 @@ var FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require( './../lib' ); // eslint-disable-line id-length -function factorial( n ) { +function factorial2( n ) { var a; var i; @@ -34,7 +34,7 @@ function factorial( n ) { var v; var i; for ( i = 0; i < 400; i++ ) { - v = factorial( i ); + v = factorial2( i ); if ( i > FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL ) { console.log( 'Unsafe: %d', v ); } else { diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/include/stdlib/constants/float64/max_safe_nth_double_factorial.h b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/include/stdlib/constants/float64/max_safe_nth_double_factorial.h index 922f522cdad4..af3454cf8786 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/include/stdlib/constants/float64/max_safe_nth_double_factorial.h +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/include/stdlib/constants/float64/max_safe_nth_double_factorial.h @@ -22,6 +22,6 @@ /** * Macro for the maximum safe nth double factorial when stored in double-precision floating-point format. */ -#define STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL 301 +#define STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL 300 #endif // !STDLIB_CONSTANTS_FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL_H diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/lib/index.js b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/lib/index.js index 65a8a7036f13..f031870abf82 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/lib/index.js +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/lib/index.js @@ -26,7 +26,7 @@ * * @example * var FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-double-factorial' ); -* // returns 301 +* // returns 300 */ @@ -37,11 +37,11 @@ * * @constant * @type {integer} -* @default 301 +* @default 300 * @see [double factorial]{@link https://en.wikipedia.org/wiki/Double_factorial} * @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985} */ -var FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL = 301|0; // eslint-disable-line id-length +var FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL = 300|0; // eslint-disable-line id-length // EXPORTS // diff --git a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/test/test.js b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/test/test.js index f7a7b9101f8d..d8a23a133ee6 100644 --- a/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/test/test.js +++ b/lib/node_modules/@stdlib/constants/float64/max-safe-nth-double-factorial/test/test.js @@ -32,7 +32,7 @@ tape( 'main export is a number', function test( t ) { t.end(); }); -tape( 'the exported value is 301', function test( t ) { - t.strictEqual( FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL, 301, 'returns expected value' ); +tape( 'the exported value is 300', function test( t ) { + t.strictEqual( FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL, 300, 'returns expected value' ); t.end(); });