File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
lib/node_modules/@stdlib/math/base/special/factorial2 Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
24
24
var isInteger = require ( '@stdlib/math/base/assert/is-integer' ) ;
25
25
var isEven = require ( '@stdlib/math/base/assert/is-even' ) ;
26
26
var PINF = require ( '@stdlib/constants/float64/pinf' ) ;
27
- var FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL = require ( '@stdlib/constants/float64/max-safe -nth-double-factorial' ) ; // eslint-disable-line id-length
27
+ var FLOAT64_MAX_NTH_DOUBLE_FACTORIAL = require ( '@stdlib/constants/float64/max-nth-double-factorial' ) ; // eslint-disable-line id-length
28
28
29
29
30
30
// MAIN //
@@ -59,7 +59,7 @@ function factorial2( n ) {
59
59
if ( isnan ( n ) ) {
60
60
return NaN ;
61
61
}
62
- if ( n > FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL ) {
62
+ if ( n > FLOAT64_MAX_NTH_DOUBLE_FACTORIAL ) {
63
63
return PINF ;
64
64
}
65
65
if ( n < 0 || isInteger ( n ) === false ) {
Original file line number Diff line number Diff line change 41
41
" @stdlib/math/base/assert/is-integer" ,
42
42
" @stdlib/math/base/assert/is-even" ,
43
43
" @stdlib/constants/float64/pinf" ,
44
- " @stdlib/constants/float64/max-safe- nth-double-factorial"
44
+ " @stdlib/constants/float64/max-nth-double-factorial"
45
45
]
46
46
},
47
47
{
59
59
" @stdlib/math/base/assert/is-integer" ,
60
60
" @stdlib/math/base/assert/is-even" ,
61
61
" @stdlib/constants/float64/pinf" ,
62
- " @stdlib/constants/float64/max-safe- nth-double-factorial"
62
+ " @stdlib/constants/float64/max-nth-double-factorial"
63
63
]
64
64
},
65
65
{
77
77
" @stdlib/math/base/assert/is-integer" ,
78
78
" @stdlib/math/base/assert/is-even" ,
79
79
" @stdlib/constants/float64/pinf" ,
80
- " @stdlib/constants/float64/max-safe- nth-double-factorial"
80
+ " @stdlib/constants/float64/max-nth-double-factorial"
81
81
]
82
82
}
83
83
]
Original file line number Diff line number Diff line change 21
21
#include "stdlib/math/base/assert/is_integer.h"
22
22
#include "stdlib/math/base/assert/is_even.h"
23
23
#include "stdlib/constants/float64/pinf.h"
24
- #include "stdlib/constants/float64/max_safe_nth_double_factorial .h"
24
+ #include "stdlib/constants/float64/max_nth_double_factorial .h"
25
25
#include <stdint.h>
26
26
27
27
/**
@@ -42,7 +42,7 @@ double stdlib_base_factorial2( const int32_t n ) {
42
42
if ( stdlib_base_is_nan ( n ) ) {
43
43
return 0.0 /0.0 ; // NaN
44
44
}
45
- if ( n > STDLIB_CONSTANT_FLOAT64_MAX_SAFE_NTH_DOUBLE_FACTORIAL ) {
45
+ if ( n > STDLIB_CONSTANT_FLOAT64_MAX_NTH_DOUBLE_FACTORIAL ) {
46
46
return STDLIB_CONSTANT_FLOAT64_PINF ;
47
47
}
48
48
if ( n < 0 || !stdlib_base_is_integer ( n ) ) {
You can’t perform that action at this time.
0 commit comments