randomsymplectic.dnary_arithmetic
int_to_dnary(n, d, result_list_size=None)
Decomposes a base 10 integer into a list of its -nary digits.
See also dnary_to_int.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
dnary_to_int(digits, d)
Given a list of the -nary digits of a number, return that number in base 10.
See also int_to_dnary.
| Parameters: |
|
|---|
| Returns: |
|
|---|
dnary_inverse(n, d)
Calculates the multiplicative inverse of n in if it exists.
If is prime and , the integer is guaranteed to exist. For general , exists if .
| Parameters: |
|
|---|
| Returns: |
|
|---|