Skip to content
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

Unexpected output in unsigned right shift #620

Closed
elasmojs opened this issue Aug 9, 2020 · 4 comments · Fixed by #520
Closed

Unexpected output in unsigned right shift #620

elasmojs opened this issue Aug 9, 2020 · 4 comments · Fixed by #520
Labels
bug Something isn't working enhancement New feature or request execution Issues or PRs related to code execution good first issue Good for newcomers parser Issues surrounding the parser
Milestone

Comments

@elasmojs
Copy link
Contributor

elasmojs commented Aug 9, 2020

Hi

const a = 5;          //  00000000000000000000000000000101
const b = 2;          //  00000000000000000000000000000010
const c = -5;         // -00000000000000000000000000000101

console.log(a >>> b); //  00000000000000000000000000000001
// expected output: 1
// got 1

console.log(c >>> b); //  00111111111111111111111111111110
// expected output: 1073741822
// got -2

thanks

@elasmojs elasmojs added the bug Something isn't working label Aug 9, 2020
@HalidOdat HalidOdat added the execution Issues or PRs related to code execution label Aug 9, 2020
@HalidOdat
Copy link
Member

This is fixed in master branch #520

closing this issue.

@Razican Razican added enhancement New feature or request parser Issues surrounding the parser good first issue Good for newcomers labels Sep 2, 2020
@Razican
Copy link
Member

Razican commented Sep 2, 2020

I'm re-opening this, since the parsing, for example, is not yet implemented, so it still panics.

@Razican Razican reopened this Sep 2, 2020
@HalidOdat
Copy link
Member

The >>> was implemented in #520, I tested this it works. got 1 and 1073741822 as expected

@HalidOdat HalidOdat linked a pull request Sep 2, 2020 that will close this issue
@Razican
Copy link
Member

Razican commented Sep 2, 2020

The >>> was implemented in #520, I tested this it works. got 1 and 1073741822 as expected

Oh, true, closing again!

@Razican Razican closed this as completed Sep 2, 2020
@Razican Razican added this to the v0.10.0 milestone Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request execution Issues or PRs related to code execution good first issue Good for newcomers parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants