rename var
This commit is contained in:
parent
c537b3dc71
commit
def7e7fa35
|
|
@ -27,11 +27,11 @@ import (
|
||||||
var extended bool
|
var extended bool
|
||||||
|
|
||||||
func computeBezouts(bezouts []big.Int, x, y *big.Int) {
|
func computeBezouts(bezouts []big.Int, x, y *big.Int) {
|
||||||
for i, c := range bezouts {
|
for i, b := range bezouts {
|
||||||
if i == len(bezouts)-1 {
|
if i == len(bezouts)-1 {
|
||||||
bezouts[i].Set(y)
|
bezouts[i].Set(y)
|
||||||
} else {
|
} else {
|
||||||
bezouts[i].Mul(&c, x)
|
bezouts[i].Mul(&b, x)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -59,8 +59,8 @@ func gcd(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
fmt.Print(z)
|
fmt.Print(z)
|
||||||
if extended {
|
if extended {
|
||||||
for _, c := range bezouts {
|
for _, b := range bezouts {
|
||||||
fmt.Printf(" %s", &c)
|
fmt.Printf(" %s", &b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue