expand help
This commit is contained in:
parent
51abf9139b
commit
a948056382
|
|
@ -144,7 +144,9 @@ var primitiveRootCmd = &cobra.Command{
|
|||
|
||||
This command computes a value g such that, for all integers a coprime to n, g^k = a (mod n) for some k. In other words, this command computes a generator for the multiplicative group of integers modulo n.
|
||||
|
||||
For improved performance, provide the prime factorization of the totient of n with the -t flag.`,
|
||||
For improved performance, provide the prime factorization of the totient of n with the -t flag.
|
||||
|
||||
Note that primitive roots only exist for the moduli 1, 2, 4, p^k, and 2p^k, where p is an odd prime. The totients of these numbers are 1, 1, 2, (p-1)*p^(k-1), and (p-1)*p^(k-1), respectively.`,
|
||||
Run: primitiveRoot,
|
||||
}
|
||||
|
||||
|
|
@ -165,4 +167,5 @@ func init() {
|
|||
primitiveRootCmd.MarkFlagRequired("modulus")
|
||||
|
||||
primitiveRootCmd.Flags().StringSliceVarP(&tpf, "totient-factorization", "t", make([]string, 0), "prime factorization of the totient of the modulus")
|
||||
// TODO: add a check flag for verifying -t input is the totient, test for performance
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue