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

Zero is an even number #40

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Zero is an even number #40

wants to merge 2 commits into from

Conversation

jfet97
Copy link

@jfet97 jfet97 commented Aug 17, 2021

No description provided.

@jfet97 jfet97 mentioned this pull request Aug 17, 2021
@n1zyy
Copy link

n1zyy commented Aug 17, 2021

After doing some research, it appears that the math checks out. The BBC says:

For mathematicians the answer is easy: zero is an even number. The rest of us may not feel completely sure.

So, if the BBC can be trusted, 👍 from me.

@phaedryx
Copy link

About half of my code is zeroes, so I really hope this gets merged.

@Hocuri
Copy link

Hocuri commented Aug 17, 2021

I don't think so, here's a mathematical proof:

  • Be n the biggest number there is.
  • Suppose 2n>n. Contradiction because we said that n is the biggest number, so 2n can't be bigger.
  • This means that 2n<=n. Subtract n on both sides to get n<=0. Therefore 0 is the biggest number.

But 0 is a very odd number to be the biggest number overall.
So, I don't think it's even.

@jfet97
Copy link
Author

jfet97 commented Aug 18, 2021

I don't think so, here's a mathematical proof:

  • Be n the biggest number there is.
  • Suppose 2n>n. Contradiction because we said that n is the biggest number, so 2n can't be bigger.
  • This means that 2n<=n. Subtract n on both sides to get n<=0. Therefore 0 is the biggest number.

But 0 is a very odd number to be the biggest number overall.
So, I don't think it's even.

I don't care what math says, Number.MAX_SAFE_INTEGER * 2 - Number.MAX_SAFE_INTEGER is equal to 9007199254740991 so 0 is even. Simple.

@CharlyRipp CharlyRipp mentioned this pull request Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants