add special case for modulus=1
This commit is contained in:
parent
f2b157732a
commit
a7547fc0eb
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue