math/big: Mention sign inversion in the (*Int).Not documentation #29949
Labels
Comments
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. |
I know that the |
CC @griesemer for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would expect that this:
prints
-1
, but actually it prints1
. The(*Int).Not
documentation simply says:I think that it's not obvious from this sentence that the sign is inverted.
The text was updated successfully, but these errors were encountered: