simplify a bit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user