purescript-contrib / purescript-bigints

Arbitrary length integers for PureScript
MIT License
26 stars 22 forks source link

Documentation doesn't match behavior for the function `not` (and possibly other functions) #6

Closed Unisay closed 7 years ago

Unisay commented 7 years ago

Doc says that function not inverts the bits. In practice, however, the behavior is the following:

> bi = fromInt 42
> bin = toBase 2
> bin bi
"101010"

> bin (not bi)
"-101011"

where expected result for the bin (not bi) would be 10101

sharkdp commented 7 years ago

Please see the upstream documentation here: https://github.com/peterolson/BigInteger.js#not