Skip to content

Commit 43cd244

Browse files
committed
fix: correct FLOAT32_MAX_SAFE_NTH_FACTORIAL
--- 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 ---
1 parent 135d9c7 commit 43cd244

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The maximum [safe][safe-integers] nth [factorial][factorial] when stored in [sin
3939
<!-- eslint-disable id-length -->
4040

4141
```javascript
42-
var bool = ( FLOAT32_MAX_SAFE_NTH_FACTORIAL === 34 );
42+
var bool = ( FLOAT32_MAX_SAFE_NTH_FACTORIAL === 10 );
4343
// returns true
4444
```
4545

@@ -71,7 +71,7 @@ function factorial( n ) {
7171

7272
var v;
7373
var i;
74-
for ( i = 0; i < 100; i++ ) {
74+
for ( i = 0; i < 20; i++ ) {
7575
v = factorial( i );
7676
if ( i > FLOAT32_MAX_SAFE_NTH_FACTORIAL ) {
7777
console.log( 'Unsafe: %d', v );

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Examples
77
--------
88
> {{alias}}
9-
34
9+
10
1010

1111
See Also
1212
--------

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @example
2525
* var max = FLOAT32_MAX_SAFE_NTH_FACTORIAL;
26-
* // returns 34
26+
* // returns 10
2727
*/
2828
declare const FLOAT32_MAX_SAFE_NTH_FACTORIAL: number;
2929

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function factorial( n ) {
3333

3434
var v;
3535
var i;
36-
for ( i = 0; i < 100; i++ ) {
36+
for ( i = 0; i < 20; i++ ) {
3737
v = factorial( i );
3838
if ( i > FLOAT32_MAX_SAFE_NTH_FACTORIAL ) {
3939
console.log( 'Unsafe: %d', v );

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/include/stdlib/constants/float32/max_safe_nth_factorial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
/**
2323
* Macro for the maximum safe nth factorial when stored in single-precision floating-point format.
2424
*/
25-
#define STDLIB_CONSTANT_FLOAT32_MAX_SAFE_NTH_FACTORIAL 34
25+
#define STDLIB_CONSTANT_FLOAT32_MAX_SAFE_NTH_FACTORIAL 10
2626

2727
#endif // !STDLIB_CONSTANTS_FLOAT32_MAX_SAFE_NTH_FACTORIAL_H

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @example
3030
* var FLOAT32_MAX_SAFE_NTH_FACTORIAL = require( '@stdlib/constants/float32/max-safe-nth-factorial' );
31-
* // returns 34
31+
* // returns 10
3232
*/
3333

3434

@@ -39,11 +39,11 @@
3939
*
4040
* @constant
4141
* @type {integer}
42-
* @default 34
42+
* @default 10
4343
* @see [factorial]{@link https://en.wikipedia.org/wiki/Factorial}
4444
* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}
4545
*/
46-
var FLOAT32_MAX_SAFE_NTH_FACTORIAL = 34|0; // asm type annotation
46+
var FLOAT32_MAX_SAFE_NTH_FACTORIAL = 10|0; // asm type annotation
4747

4848

4949
// EXPORTS //

lib/node_modules/@stdlib/constants/float32/max-safe-nth-factorial/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tape( 'main export is a number', function test( t ) {
3232
t.end();
3333
});
3434

35-
tape( 'the exported value is 34', function test( t ) {
36-
t.strictEqual( FLOAT32_MAX_SAFE_NTH_FACTORIAL, 34, 'returns expected value' );
35+
tape( 'the exported value is 10', function test( t ) {
36+
t.strictEqual( FLOAT32_MAX_SAFE_NTH_FACTORIAL, 10, 'returns expected value' );
3737
t.end();
3838
});

0 commit comments

Comments
 (0)