Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RobTillaart/Arduino
/ dpermutations
Function
dpermutations
libraries/statHelpers/statHelpers.cpp:40–48 ·
view source on GitHub ↗
can be optimized similar to dfactorial
Source
from the content-addressed store, hash-verified
38
39
// can be optimized similar to dfactorial
40
double dpermutations(uint8_t n, uint8_t k)
41
{
42
double rv = 1;
43
for (uint8_t i = n; i > (n - k); i--)
44
{
45
rv *= i;
46
}
47
return rv;
48
}
49
50
51
/*
Callers
1
unittest
Function · 0.85
Calls
no outgoing calls
Tested by
1
unittest
Function · 0.68