• boog (unregistered) in reply to Siskel and Ebert
Siskel and Ebert:
boog:
Rocky V + Rocky II = ?
Is that the one where an aging Tommy Gunn fights a re-animated Apollo Creed?
Actually it's a Simpsons reference.

Tough crowd.

• Mark (unregistered) in reply to icebrain
icebrain:
To those saying that 215 and 1 aren't random numbers: go study statistics.

Better yet, you go study context. In programming, it is reasonable to assume if the variable name (or comments, or specs, or requirements) call for a "random" number, they mean "a number randomly generated at the time of this execution". A constant obviously doesn't meet the criteria, even if it were generated randomly, even though it could belong to a random set, even though if you did randomly generate a number it's possible you'd get that same value on every execution.

Oh, and by the way, who claimed that 1 isn't random? I see plenty of posts takling about whether 1 is prime, but none talking about whether it's random.

• Mark (unregistered) in reply to Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Uh...:
public static int RANDOM_PRIME_NUMBER = 215
Ok, I see how this might be random when he entered it, but I do not see how it is prime.
Of course it's prime. Just not in base 10, or anything else you might reasonably expect. (Try 6, or 36).

Yeah... and if your compiler interprets numeric literals in base 6 or base 36, you have a point. Since it doesn't, your attempt to demonstrate math nerd cred backfires as you fail to properly distinguish notations from numbers.

In any language that code could possibly have come form, the token 215 means "the decimal number 215". Nice try.

• ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€ (unregistered) in reply to Maurits
Maurits:
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Uh...:
public static int RANDOM_PRIME_NUMBER = 215
Ok, I see how this might be random when he entered it, but I do not see how it is prime.
Of course it's prime. Just not in base 10, or anything else you might reasonably expect. (Try 6, or 36).

hex comes close... very close...

Here are the bases below 250 in which 215 is prime.

83 = 215 base 6 1181 = 215 base 24 1601 = 215 base 28 2351 = 215 base 34 2633 = 215 base 36 4283 = 215 base 46 6791 = 215 base 58 8783 = 215 base 66 11633 = 215 base 76 12251 = 215 base 78 15581 = 215 base 88 26111 = 215 base 114 30881 = 215 base 124 31883 = 215 base 126 38231 = 215 base 138 41621 = 215 base 144 43961 = 215 base 148 47591 = 215 base 154 67901 = 215 base 184 69383 = 215 base 186 91811 = 215 base 214 109751 = 215 base 234 119321 = 215 base 244 121283 = 215 base 246

You win the internets. Well-played...
• (cs) in reply to ShatteredArm
ShatteredArm:
smxlong:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

I most certainly would not.

You haven't explained how you arrived at that conclusion; you've just stated it. If you can just say that without backing it up, then I can refute it by simply saying that 0.999... is not the largest number that is less than 1, because it's equal to 1. And if a == b, then !(a < b).

And there has to be a number between the two because between any two distinct real numbers, there is another real number. (This is what smxlong meant by "the density of real numbers".) Therefore, if 0.999... and 1 are not equal, there must be a real number between them. What is it?

• The Maths (unregistered) in reply to Someone You Know
Someone You Know:
ShatteredArm:
smxlong:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

I most certainly would not.

You haven't explained how you arrived at that conclusion; you've just stated it. If you can just say that without backing it up, then I can refute it by simply saying that 0.999... is not the largest number that is less than 1, because it's equal to 1. And if a == b, then !(a < b).

And there has to be a number between the two because between any two distinct real numbers, there is another real number. (This is what smxlong meant by "the density of real numbers".) Therefore, if 0.999... and 1 are not equal, there must be a real number between them. What is it?

What kind of moronic argument is this? I'll tell you: one by someone who knows nothing about mathematics.

We're not talking about flavors for ice cream or your favorite color for a gerbil: we're talking about math. Good ol' simple, unchanging math.

• Dude (unregistered) in reply to The Maths
The Maths:
Someone You Know:
ShatteredArm:
smxlong:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

I most certainly would not.

You haven't explained how you arrived at that conclusion; you've just stated it. If you can just say that without backing it up, then I can refute it by simply saying that 0.999... is not the largest number that is less than 1, because it's equal to 1. And if a == b, then !(a < b).

And there has to be a number between the two because between any two distinct real numbers, there is another real number. (This is what smxlong meant by "the density of real numbers".) Therefore, if 0.999... and 1 are not equal, there must be a real number between them. What is it?

What kind of moronic argument is this? I'll tell you: one by someone who knows nothing about mathematics.

We're not talking about flavors for ice cream or your favorite color for a gerbil: we're talking about math. Good ol' simple, unchanging math.

First off... you haven't made an argument. But that's ok, I happen to know an easy proof that doesn't involve real number density or any thing else very complicated.

0.333... = 1/3 multiply both sides by 3 and you get 0.999... = 3/3 collapse the fraction 0.999... = 1

• Crash Magnet (unregistered)

Does 0.999... = 1?

F(n) = lim(10^n - 1)/10^n, n -> oo)

Take the derivitive of num & denom.

F(n) = lim(10n/10n, n -> oo) F(n) = 1.0

QED

• If maths was politics (unregistered) in reply to hatterson
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

I suggest as a compromise: .999... is not a prime.

I think the mathematicians and the dilettants can agree on this, even though for different reasons.

• Crash Magnet (unregistered) in reply to Crash Magnet
Crash Magnet:
Does 0.999... = 1?

F(n) = lim(10^n - 1)/10^n, n -> oo)

Take the derivitive of num & denom.

F(n) = lim(10n/10n, n -> oo) F(n) = 1.0

QED

Actually, I just realized that the derivitive of 10^n is not 10n. But the derivitive of the num & denom would be the same anyway and you would still get the answer 1.0.

• fjf (unregistered) in reply to Dude
Dude:
I happen to know an easy proof that doesn't involve real number density or any thing else very complicated
Actually, real number density isn't very complicated at all. For any two different real numbers a and b, their average c=(a+b)/2 is a real number that's between them (a<c<b or b<c<a). <p>So for those who believe 0.999... != 1, what would be the average of those two numbers?

• boog (unregistered) in reply to Mark
Mark:
icebrain:
To those saying that 215 and 1 aren't random numbers: go study statistics.

Better yet, you go study context. In programming, it is reasonable to assume if the variable name (or comments, or specs, or requirements) call for a "random" number, they mean "a number randomly generated at the time of this execution". A constant obviously doesn't meet the criteria, even if it were generated randomly, even though it could belong to a random set, even though if you did randomly generate a number it's possible you'd get that same value on every execution.

Oh, and by the way, who claimed that 1 isn't random? I see plenty of posts takling about whether 1 is prime, but none talking about whether it's random.

Not so fast there Mark. You don't know the requirements for this application. Perhaps the requirement was for a random number no less than 215, but no more than 215. Sure, he could have generated it at run-time, but maybe the developer was smarter than that and figured out a brilliant way of saving a few CPU cycles.

As for it being prime, several people have pointed out that 215 is a prime number in other number bases. Perhaps this developer was working in an environment that operates under one of these other number bases. He also saves himself even more CPU cycles by foregoing any business logic that might assert the number's "prime-ness".

Yes, I do believe that given these very specific and completely absurd circumstances, it's safe to say that 215 could be a random prime number and that the code we are seeing is the work of an absolute genius.

• (cs)

The guy who tested for "(1 == 0)" doesn't seem very thorough to me at all.

I mean, in some universe, this "if" could very well test false but "if (2 == 0)" might test true. What about that?

I think he should have tested all the numbers...

...like I do. ;)

• (cs) in reply to Anonymous
Anonymous:
Severity One:
Unless 1 == 0, that's Java.
So I appreciate that Java supports generics now, as per my previous comment, but I have to take exception at the above statement which is patently false. The code provided is valid C# syntax, assuming one had written a custom class called HashMap<T,T>. So your assertion is false because 1 != 0 but it is still possible for that code to be C#.

</pendantry>

You just keep digging your own hole deeper, don't you?

Let's go through it:

I claim that 'Unless 1 == 0, that's Java', which can be rewritten (at least in this universe) as 'Unless false, that's Java', or 'If true, that's Java', so in short: 'That's Java'.

You claim that my claim is (and I quote) "patently false"; in other words, 'that's not Java'.

However, it has been shown that it is.

The code provided is valid C# syntax
...which doesn't mean it's not valid Java syntax as well.

Ergo, you need to pick up a bit on Boolean algebra. Why don't you submit some of your code to Alex? I'm sure we'll all appreciate it. :)

• (cs) in reply to Crash Magnet
Crash Magnet:
Does 0.999... = 1?

F(n) = lim(10^n - 1)/10^n, n -> oo)

Take the derivitive of num & denom.

F(n) = lim(10n/10n, n -> oo) F(n) = 1.0

QED

I saw this somewhere:

Given x = .999...

Then: 10x = 9.999...

Now subtract x:

10x - x = 9.999... - .999...

Complete the subtraction:

9x = 9.000...

But the endlessly repeated 0 is redundant so:

9x = 9

Factor out the 9:

x = 1

Now, substituting the original value for x:

.999... = 1

QED

• boog (unregistered) in reply to Coyne
Coyne:
The guy who tested for "(1 == 0)" doesn't seem very thorough to me at all.

I mean, in some universe, this "if" could very well test false but "if (2 == 0)" might test true. What about that?

I think he should have tested all the numbers...

Why only compare to zero? Sure, (1 == 0) and (2 == 0) might both test false, but what about (2 == 1)?

What about numbers that should be equal but aren't? Like (1 != 1)? (2 != 2)?

I think we're looking at a cross product of all numbers A vs. all numbers B, testing for inequality when they're equal, and testing for equality when they're not. Only then will I be confident that we are "running in the correct Universe".

• (cs) in reply to The Maths
The Maths:
Someone You Know:
ShatteredArm:
smxlong:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

I most certainly would not.

You haven't explained how you arrived at that conclusion; you've just stated it. If you can just say that without backing it up, then I can refute it by simply saying that 0.999... is not the largest number that is less than 1, because it's equal to 1. And if a == b, then !(a < b).

And there has to be a number between the two because between any two distinct real numbers, there is another real number. (This is what smxlong meant by "the density of real numbers".) Therefore, if 0.999... and 1 are not equal, there must be a real number between them. What is it?

What kind of moronic argument is this? I'll tell you: one by someone who knows nothing about mathematics.

Well, to be fair, the person who posited that "0.999..." is the largest number that is less than 1 knows nothing about mathematics either. I don't know whether that was you or not.

The nature of real numbers is that if you give me a number "a" such that a < 1, there are always an infinite number of choices for a number "b" such that a < b < 1. That's where "real number density" comes in. There is no "largest number less than..." when dealing with real numbers.

So it was a BS premise that led to what you call a "moronic" argument.

• PRMan (unregistered)

Okay, in one version of ASP.NET there was a bug where Microsoft would generate a table (for a datagrid or something) that was missing the end table tag. I had to add myself to ensure that it got closed.

The could very well be a valid fix for something like that (not in NoScript tags however).

• anon (unregistered)

Arnold Vriezekolk's colleague is wrong when he states that he is in the wrong universe if 1=0. He is merely operating on the wrong ring. In ℤ/ℤ, zero is clearly equal to one.

• The Maths (unregistered) in reply to Markp

I was not calling your argument moronic, I said the argument itself is moronic.

• Gargo (unregistered) in reply to Uh...
Uh...:
public static int RANDOM_PRIME_NUMBER = 215
Ok, I see how this might be random when he entered it, but I do not see how it is prime.

Maybe it is intended to be used as a parameter (like a #define) to a function e.g.:

public int GetNumber(int numberType) {
if (numberType == RANDOM_PRIME_NUMBER) {
...
}
...
}

• (cs) in reply to The Maths
The Maths:
Someone You Know:
ShatteredArm:
smxlong:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

I most certainly would not.

You haven't explained how you arrived at that conclusion; you've just stated it. If you can just say that without backing it up, then I can refute it by simply saying that 0.999... is not the largest number that is less than 1, because it's equal to 1. And if a == b, then !(a < b).

And there has to be a number between the two because between any two distinct real numbers, there is another real number. (This is what smxlong meant by "the density of real numbers".) Therefore, if 0.999... and 1 are not equal, there must be a real number between them. What is it?

What kind of moronic argument is this? I'll tell you: one by someone who knows nothing about mathematics.

We're not talking about flavors for ice cream or your favorite color for a gerbil: we're talking about math. Good ol' simple, unchanging math.

I'm sorry, but I have no idea what point you're trying to make here.

• (cs) in reply to Anonymous
Anonymous:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

Well, technically there is nothing to discuss because they most certainly are equal and it is a simple proof to confirm this beyond doubt. But damn, what a mindfuck eh? I remember when I first had to tackle this concept back in maths class, many years ago. Took a long time to get my head around. But once it clicked it was like a lightbulb going off in my head, I literally blurted out "fuck me!" in the middle of my maths class, directly to the lecturer. He was a bit of an old bastard and I thought he was going to go ballistic, but he just looked at me with a knowing smile and gently nodded. I had joined the club.

Oh I'm well aware that they're the same number (just different representations) I just thought it would be fun to troll a thread on that rather than on if 1 is prime.

.999... == 1 usually provides more entertaining responses to read since the is 1 prime "debate" just ends with "it's not because we said it's not."

Edit: And looking at the last page or so, I greatly succeeded.

• (cs) in reply to If maths was politics
If maths was politics:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

I suggest as a compromise: .999... is not a prime.

I think the mathematicians and the dilettants can agree on this, even though for different reasons.

Haha, well done sir.

• Not a math major (unregistered) in reply to TGV
TGV:
I can only hope they rolled a die to ensure this was actually random
And I hope they are in a universe where 215 is actually a prime.
If you add each digit in the number it's prime: 2 + 1 + 5 = 7
• boog (unregistered) in reply to Severity One

Fair enough, it's valid syntax in both C# and Java.

But you said it is Java.

Severity One:
Unless 1 == 0, that's Java.
And you clarified your argument, for those of us who are "running in the correct Universe":
Severity One:
...so in short: 'That's Java'.
I've never heard of someone taking a snippet of code that exists in the context of a C# application and outright calling it "Java" (or vice versa). So this implies that either A) you know more about the actual habitat of this code snippet than we do, or B) you're making assumptions. I think the GP was arguing B.

I'm not saying you're wrong, I'm just suggesting that you revise your statement to avoid these silly arguments.

what Severity One should have said:
Unless 1 == 0, that's valid Java syntax.
Isn't that more accurate?
• anon (unregistered) in reply to Not a math major
Not a math major:
TGV:
I can only hope they rolled a die to ensure this was actually random
And I hope they are in a universe where 215 is actually a prime.
If you add each digit in the number it's prime: 2 + 1 + 5 = 7
If 1=0.
• Not a math major (unregistered) in reply to anon
anon:
Not a math major:
TGV:
I can only hope they rolled a die to ensure this was actually random
And I hope they are in a universe where 215 is actually a prime.
If you add each digit in the number it's prime: 2 + 1 + 5 = 7
If 1=0.
WIN!!
• (cs) in reply to anon
anon:
Not a math major:
TGV:
I can only hope they rolled a die to ensure this was actually random
And I hope they are in a universe where 215 is actually a prime.
If you add each digit in the number it's prime: 2 + 1 + 5 = 7
If 1=0.
This is likely the best comment I've seen on here in a good long while.
• fjf (unregistered) in reply to boog
boog:
Coyne:
The guy who tested for "(1 == 0)" doesn't seem very thorough to me at all.

I mean, in some universe, this "if" could very well test false but "if (2 == 0)" might test true. What about that?

I think he should have tested all the numbers...

Why only compare to zero? Sure, (1 == 0) and (2 == 0) might both test false, but what about (2 == 1)?

What about numbers that should be equal but aren't? Like (1 != 1)? (2 != 2)?

I think we're looking at a cross product of all numbers A vs. all numbers B, testing for inequality when they're equal, and testing for equality when they're not. Only then will I be confident that we are "running in the correct Universe".

Amateur. Maybe 1 != 0 once, but not the second or third time. So you have to test each pair an infinite number of times. And don't get me started about testing arithmetics ...

• neminem (unregistered) in reply to Jay
Comment held for moderation.
• Syntax (unregistered)

The 215 looks like a seed value for HashCode(ing) in Java (though it's obviously misnamed). We do something similar where we have a seed (to decrease collisions) and a different number which is prime *= applied to the hash of each significant field.

Joshua Bloch uses a similar technique in Effective Java.

• MG (unregistered) in reply to Coyne
Comment held for moderation.
• (cs) in reply to Crash Magnet
Crash Magnet:
Crash Magnet:
Does 0.999... = 1?

F(n) = lim(10^n - 1)/10^n, n -> oo)

Take the derivitive of num & denom.

F(n) = lim(10n/10n, n -> oo) F(n) = 1.0

QED

Actually, I just realized that the derivitive of 10^n is not 10n. But the derivitive of the num & denom would be the same anyway and you would still get the answer 1.0.

for the record: d/dx (10^x) = d/dx ((e^ln 10)^x) = d/dx (e^(x ln 10)) = by the chain rule: e^(x ln 10) d/dx (x ln 10) = (ln 10) (e^(x ln 10)) = (ln 10) ((e^ln 10)^x) = (ln 10) (10^x)

• boog (unregistered) in reply to fjf
fjf:
Amateur. Maybe 1 != 0 once, but not the second or third time. So you have to test each pair an infinite number of times. And don't get me started about testing arithmetics ...
This is getting out of hand. Let's just use the following check and call it a day:
if(!universe.isCorrect())
If you really think the correctness of the universe will change during execution, feel free to extend your own universe and implement some event handling code.
• The Maths (unregistered) in reply to MG
Comment held for moderation.
• Guiro (unregistered) in reply to Skawt

IsAlphaNumeric = IsAlphaOrNumeric = !IsAlpha & !IsNumeric (apparently)

Therefore !IsFunny & !IsInsightful = IsFunnyOrInsightful

• Hamish (unregistered)

Haven't read all the comments, but wanted to point at that example 1 isn't much of a WTF. A particular templating engine I work with, for example, could act on an object set (iterable) that has it's own properties. In order to iterate over the object's items while in that object's template you need a reference to the object to pass to the sub template.

I might seem silly if you don't know the context, but it makes perfect sense.

• (cs) in reply to neminem
neminem:
Jay:
"Jewish atheists" would be something of a paradox

No, it wouldn't. "Jewish" is a rather vague term: it's a religion, a culture, and a race.

^^^ This. I was pointing out that the original post specifically stated "Judaism", which does refer to just the religion, and the reply asked who else speaks (the Jewish language) Hebrew, implying that "Jewish" and "Judaism" were synonymous. Which, as you observe, is indeed not the case.
• (cs) in reply to 1st Century Christian
1st Century Christian:
Jay:
DaveK:
Bob:
shimon:
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
Really? WTF else speaks Hebrew? God?
Jewish atheists, duh.

And most first-century Christians.

Though technically you should probably say "Hebrew-speaking atheists". "Jewish atheists" would be something of a paradox, like "Buddhist Moslems". Not that people don't say it all the time.

Hey, guys. I just climbed into my time machine to post this here, since you needed a non-Jew that speaks Hebrew. Just FYI we Christians are Jews too.
No, we didn't need a non-Jew that speaks Hebrew: we needed someone who was non-Judaic who spoke Hebrew. Which you Jewish Christians quite clearly are, since you're followers of Christianity, and not followers of Judaism.
• Ouch! (unregistered) in reply to Hamish
Hamish:
Haven't read all the comments, but wanted to point at that example 1 isn't much of a WTF. A particular templating engine I work with, for example, could act on an object set (iterable) that has it's own properties. In order to iterate over the object's items while in that object's template you need a reference to the object to pass to the sub template.

I might seem silly if you don't know the context, but it makes perfect sense.

But how do you invoke the object's getSelf() method to get a reference to the object unless you already have a reference? getSelf() is not static.

• stu (unregistered) in reply to Ancient Mathematician
Ancient Mathematician:
WthyrBendragon:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

Well, it is only integer factorable to 1 and itself so, yes, 1 is prime.

However, random it is not.

Well, if you were old enough, you'd know that 1 is not even a number, so it can't be a prime. And if you're young enough, you should know that 1 is a unit, so it can't be a prime. Only if you're stuck some time between -200 and 1900 is 1 a prime.
Fixed focal length lenses are considered prime lenses. So if a photographer has a fixed 1mm lens, it's considered a 1mm prime lens. So 1 must be prime!

• Dave (unregistered)

I had a coworker who defined these in a global include file:

#define ThereIsLifeInTheUniverse 1 #define EverAndEver ;;

(This was in C)

And then in code would do things like this...

if (ThereIsLifeInTheUniverse) ... whatever

or

for (EverAndEver) { // Hallelujah, Hallelujah! }

• (cs)

// warning: calling getSelf may make you go blind

• (cs) in reply to Coyne
Coyne:
Crash Magnet:
Does 0.999... = 1?

F(n) = lim(10^n - 1)/10^n, n -> oo)

Take the derivitive of num & denom.

F(n) = lim(10n/10n, n -> oo) F(n) = 1.0

QED

I saw this somewhere:

Given x = .999...

Then: 10x = 9.999...

Now subtract x:

10x - x = 9.999... - .999...

Complete the subtraction:

9x = 9.000...

But the endlessly repeated 0 is redundant so:

9x = 9

Factor out the 9:

x = 1

Now, substituting the original value for x:

.999... = 1

QED

IANAMathematician.

This puzzle was first given to me in high school circa 1987. I worked on it with my math teacher and, later on, with my brother because he got his degree in math.

The issues I've known to exist in this:

1. Performing a mathematical operation on an infinitely long number is undefined. You never technically reach the end multiplying by 10 because you don't know what happens at the very end of the number. The same thing can be argued for the subtraction.

2. As a value tends toward a limit in a graph, it's possible for the value that is being approached to have a discontinuity in the graph. So yes, it is likely that the two values are equal, but one cannot conclusively prove via graphs and limits that, indeed, the two are equal.

• LB (unregistered) in reply to ShatteredArm
ShatteredArm:
smxlong:
hatterson:
by the density of the real numbers, there must be some number X where 0.999... < X < 1.
Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

And if a < b, then a != b.

Indeed there are number systems in which there is such a thing as "the largest number that is less than 1", but the only number system in widespread use in which 0.999... is a valid number is the real number system, and that one involves a continuum (the number line) rather than a series of discreet points.

Of course, if you want to posit a number system of discreet points in which there is a point for 0.999... distinct from the point for 1, you can. (There are, after all, an infinite number of possible number systems.) But you would need to define both the notation and rules for this number system yourself and identify that it's the number system you're using, since it's not one in regular use by mathematicians.

• Henning Makholm (unregistered) in reply to Coyne
Now, substituting the original value for x:

.999... = 1

QED

Glad that's settled. Let's do the Monty Hall problem next, shal we?

You get a 13/27 probability of winning if you switch doors.

• Sam (unregistered) in reply to Dave
I had a coworker who defined these in a global include file:

#define ThereIsLifeInTheUniverse 1 #define EverAndEver ;;

(This was in C)

And then in code would do things like this...

if (ThereIsLifeInTheUniverse) ... whatever

or

for (EverAndEver) { // Hallelujah, Hallelujah! }

The jokes on him! By using constant definitions like that his code will execute incorrectly when it runs on the last computer on some cold dead rock in a dying universe.

Should have included that scenario in the unit tests, or used a real constant like

#define PopeIsCatholic 1

I hadn't seen the for ever and ever one before, that's pretty good!

• (cs) in reply to Anonymous Kernel Hacker
Anonymous Kernel Hacker:
I think certain versions of Linux have included the line

if(false)panic();

just to verify that boolean logic is operating correctly.

On any modern compiler, this would only verify things at compile time. To check if the runtime environment is sane, you'd need to have something like:
volatile static int unhunh = 0;
void sanity_check(void)
{
if (unhunh) panic();
}

I would need to check in the standard as to whether a static volatile won't be subject to optimization, but my initial gut feel is that with most compilers it would produce code that actually checks the value of unhunh in memory at runtime.
• (cs) in reply to LB
LB:
ShatteredArm:
smxlong:
hatterson:
by the density of the real numbers, there must be some number X where 0.999... < X < 1.
Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

And if a < b, then a != b.

Indeed there are number systems in which there is such a thing as "the largest number that is less than 1", but the only number system in widespread use in which 0.999... is a valid number is the real number system, and that one involves a continuum (the number line) rather than a series of discreet points.

Of course, if you want to posit a number system of discreet points in which there is a point for 0.999... distinct from the point for 1, you can. (There are, after all, an infinite number of possible number systems.) But you would need to define both the notation and rules for this number system yourself and identify that it's the number system you're using, since it's not one in regular use by mathematicians.

Oh boy. Why so convoluted, when it's all easy. We must not forget that 0.999(9) is merely a notation in decimal positional system. That notation denotes the number 1. Yes, it's perhaps weird that every real number with a finite expansion in a positional system has a second, equivalent notation that has an infinite expansion in that same system. It's a quirk, but I've heard of it in high school math class. It works in any positional system, too. In binary, you have it too: 1.0 == 0.1111111(1), or say 0.5[base 10] = 0.1[base 2] = 0.0111(1), and so on.

Remember: it's a quirk of positional representation, nothing more and nothing less. If you write 0.999(9), or using your notation 0.9999..., you are representing number 1. That's all there is to it.