add special case for modulus=1

This commit is contained in:
filifa 2025-08-19 22:00:14 -04:00
parent f2b157732a
commit a7547fc0eb
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ var modulus string
var tpf []string
func computeNaive(modulus *big.Int) (*big.Int, error) {
if modulus.Cmp(big.NewInt(1)) == 0 {
return big.NewInt(0), nil
}
for g := big.NewInt(1); g.Cmp(modulus) == -1; g.Add(g, big.NewInt(1)) {
e := big.NewInt(1)
exps := make(map[string]big.Int)