Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Snapchat/KeyDB
/ factorial
Function
factorial
deps/jemalloc/test/unit/math.c:27–37 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
25
}
26
27
static uint64_t
28
factorial(unsigned x) {
29
uint64_t ret = 1;
30
unsigned i;
31
32
for (i = 2; i <= x; i++) {
33
ret *= (uint64_t)i;
34
}
35
36
return ret;
37
}
38
39
TEST_BEGIN(test_ln_gamma_factorial) {
40
unsigned x;
Callers
1
math.c
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected