MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / factorial_modP_Wilson

Function factorial_modP_Wilson

Python/CP_Templates.py:40–46  ·  view source on GitHub ↗
(n, p)

Source from the content-addressed store, hash-verified

38
39
40def factorial_modP_Wilson(n, p):
41 if (p <= n):
42 return 0
43 res = (p - 1)
44 for i in range(n + 1, p):
45 res = (res * cached_fn(InverseEuler, i, p)) % p
46 return res
47
48
49def binary(n, digits=20):

Callers

nothing calls this directly

Calls 1

cached_fnFunction · 0.85

Tested by

no test coverage detected