File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed
lib/node_modules/@stdlib/math/base/special/factorial2 Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change 37
37
"libpath" : [],
38
38
"dependencies" : [
39
39
" @stdlib/math/base/napi/unary" ,
40
- " @stdlib/math/base/assert/is-nan" ,
41
- " @stdlib/math/base/assert/is-integer" ,
42
40
" @stdlib/math/base/assert/is-even" ,
43
41
" @stdlib/constants/float64/pinf" ,
44
42
" @stdlib/constants/float64/max-nth-double-factorial"
55
53
"libraries" : [],
56
54
"libpath" : [],
57
55
"dependencies" : [
58
- " @stdlib/math/base/assert/is-nan" ,
59
- " @stdlib/math/base/assert/is-integer" ,
60
56
" @stdlib/math/base/assert/is-even" ,
61
57
" @stdlib/constants/float64/pinf" ,
62
58
" @stdlib/constants/float64/max-nth-double-factorial"
73
69
"libraries" : [],
74
70
"libpath" : [],
75
71
"dependencies" : [
76
- " @stdlib/math/base/assert/is-nan" ,
77
- " @stdlib/math/base/assert/is-integer" ,
78
72
" @stdlib/math/base/assert/is-even" ,
79
73
" @stdlib/constants/float64/pinf" ,
80
74
" @stdlib/constants/float64/max-nth-double-factorial"
Original file line number Diff line number Diff line change 17
17
*/
18
18
19
19
#include "stdlib/math/base/special/factorial2.h"
20
- #include "stdlib/math/base/assert/is_nan.h"
21
- #include "stdlib/math/base/assert/is_integer.h"
22
20
#include "stdlib/math/base/assert/is_even.h"
23
21
#include "stdlib/constants/float64/pinf.h"
24
22
#include "stdlib/constants/float64/max_nth_double_factorial.h"
@@ -39,13 +37,10 @@ double stdlib_base_factorial2( const int32_t n ) {
39
37
double out ;
40
38
int32_t v ;
41
39
int32_t i ;
42
- if ( stdlib_base_is_nan ( n ) ) {
43
- return 0.0 /0.0 ; // NaN
44
- }
45
40
if ( n > STDLIB_CONSTANT_FLOAT64_MAX_NTH_DOUBLE_FACTORIAL ) {
46
41
return STDLIB_CONSTANT_FLOAT64_PINF ;
47
42
}
48
- if ( n < 0 || ! stdlib_base_is_integer ( n ) ) {
43
+ if ( n < 0 ) {
49
44
return 0.0 /0.0 ;
50
45
}
51
46
v = n ;
You can’t perform that action at this time.
0 commit comments