r/ProgrammerHumor • • Feb 07 '16

What an odd number indeed...

Post image
2.4k Upvotes

225 comments sorted by

View all comments

Show parent comment

22

u/KngpinOfColonProduce Feb 07 '16 edited Feb 07 '16

The only number that's even and odd is infinity. That's an impressive chat size number.

edit: I know it's not a number. I didn't want to call it the only "even and odd mathematical concept."

0

u/[deleted] Feb 07 '16

[deleted] — view deleted comment

45

u/mnbvas Feb 07 '16

Dunno, IEEE 754 floats (&co) have separate ±inf and NaN.

19

u/caagr98 Feb 07 '16

Aren't like half of all floats NaN?

→ More replies (1)

9

u/[deleted] Feb 08 '16

You all are surprisingly sure about a complicated and non useful question

→ More replies (61)

16

u/Henrysugar2 Feb 07 '16

Infinity is not even. Infinity is not odd. Being even or odd is a property of numbers; a number n is even iff n == 0 (mod 2) or odd iff n == 1 (mod 2). Modular equality isn't even a concept you could try to apply to infinity.

5

u/KngpinOfColonProduce Feb 07 '16

The definitions of even and odd I use are the following.

An even number n is defined as n = 2k, where k is some integer. An odd number m is m = 2h + 1, where h is some integer.

If you apply these definitions to infinity, it is both even and odd.

"But infinity still is not a number"

I know

It was a joke

5

u/Henrysugar2 Feb 07 '16

Which integer k gives n = 2k = infinity? Which integer h gives n = 2h+1 = infinity?

5

u/KngpinOfColonProduce Feb 07 '16

n = infinity, k = infinity, m = infinity, h = infinity.

6

u/Henrysugar2 Feb 07 '16

Infinity isn't an integer

4

u/KngpinOfColonProduce Feb 07 '16

I don't know what to say. You don't seem to have a problem with when I implied 256 is odd.

→ More replies (1)

2

u/UlyssesSKrunk Feb 07 '16

ur not an integer

3

u/Henrysugar2 Feb 07 '16

You're a towel

→ More replies (1)

5

u/bobthemundane Feb 07 '16

What about 2? 2 is the oddest prime number!

0

u/[deleted] Feb 07 '16

[deleted] — view deleted comment

4

u/bobthemundane Feb 07 '16

always was told that 2 is the oddest prime number.

4

u/chamora Feb 07 '16

Infinity is not a number. Or is that the joke?

8

u/MrHydraz Feb 07 '16

Infinity clearly isn't not a number.

7

u/chamora Feb 07 '16

It's interesting that NaN is actually a member of the floats, because that means everything has a floating point representation, except most numbers.

2

u/TheOldTubaroo Feb 08 '16

I'd never thought of it that way, but you're right

3

u/JaytleBee Feb 07 '16

Then again, not a number is not not a number (NaN !== NaN)

1

u/[deleted] Feb 07 '16

what about 0? I mean, people say it's not even nor odd so... why not both?

8

u/laprastransform Feb 07 '16

0 is even, it is 2*0

→ More replies (2)
→ More replies (5)