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

Use parenthesis in (x & 1) == 1 #1995

Closed
axkr opened this issue Mar 27, 2022 · 3 comments
Closed

Use parenthesis in (x & 1) == 1 #1995

axkr opened this issue Mar 27, 2022 · 3 comments

Comments

@axkr
Copy link

axkr commented Mar 27, 2022

for oddness, consider using x & 1 == 1, or x % 2 != 0.

should be changed to

for oddness, consider using (x & 1) == 1, or (x % 2) != 0.
@welcome
Copy link

welcome bot commented Mar 27, 2022

Thanks for opening your first issue here! 😃
Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.

@4sujittiwari
Copy link
Contributor

@KengoTODA @axkr I have raised a PR to update the documentation with parenthesis.

PR 2002

KengoTODA pushed a commit that referenced this issue Apr 7, 2022
…1995 (#2002)

* Fixed documentation issue by adding parenthesis `()` to the negative odd check message

* updated CHANGELOG.md

Co-authored-by: Sujit Kumar <Sujit_Kumar@gap.com>
@KengoTODA
Copy link
Member

closed by #2002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants