Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
math/big: Mention sign inversion in the (*Int).Not documentation #29949
I would expect that this:
i = big.NewInt(-2) log.Println(new(big.Int).Not(i).Text(2))
I think that it's not obvious from this sentence that the sign is inverted.
This matches how Go handles signed integer negation: https://play.golang.org/p/BhiwKrHhVj2
If it’s a problem with Not, perhaps the doc fix should apply equally to all bitwise methods.