MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / permutations64

Function permutations64

libraries/statHelpers/statHelpers.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28uint64_t permutations64(uint8_t n, uint8_t k)
29{
30 uint64_t rv = 1;
31 for (uint8_t i = n; i > (n - k); i--)
32 {
33 rv *= i;
34 }
35 return rv;
36}
37
38
39// can be optimized similar to dfactorial

Callers 1

unittestFunction · 0.85

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.68