simplify a bit

This commit is contained in:
filifa 2025-08-21 19:11:14 -04:00
parent da252dc9de
commit 4661e2d974
1 changed files with 2 additions and 3 deletions

View File

@ -35,12 +35,11 @@ func crt(cmd *cobra.Command, args []string) {
ns := make([]*big.Int, len(moduli))
for i := range moduli {
n, ok := new(big.Int).SetString(moduli[i], 10)
var ok bool
ns[i], ok = new(big.Int).SetString(moduli[i], 10)
if !ok {
log.Fatal("invalid input " + moduli[i])
}
ns[i] = new(big.Int).Set(n)
}
// TODO: support non-pairwise coprime moduli