-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-3 >> 8 == 0 #49
Comments
Hm... maybe we should throw on negative numbers instead? I don't believe there is much use in this compatibility thing, and there are potentially lots of troubles involved with supporting this in the library. |
Throwing is fine |
Hm... it looks like I use this behaviour quite heavily in bn.js. Sorry, but I'm not going to fix it, at least not now. |
indutny
added a commit
that referenced
this issue
Jul 7, 2015
`ishrn`/`ishln` should require positive numbers, `iushrn`/`iushln` should not give a thing about it. Fix: #49
indutny
added a commit
that referenced
this issue
Jul 7, 2015
`ishrn`/`ishln` should require positive numbers, `iushrn`/`iushln` should not give a thing about it. Fix: #49
indutny
added a commit
that referenced
this issue
Jul 7, 2015
`ishrn`/`ishln` should require positive numbers, `iushrn`/`iushln` should not give a thing about it. Fix: #49
To clarify for future onlookers, this was fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in JavaScript
-3 >> 8 === -1
, inbn.js
it is0
.I think,
x >> n
should be equal tofloor(x / 2**n)
for compatibility with JavaScript and some other librariesThe text was updated successfully, but these errors were encountered: