| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 14:54
•
by
boog
(unregistered)
|
Actually it's a Simpsons reference. Tough crowd. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 14:54
•
by
Mark
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 14:58
•
by
Mark
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 14:59
•
by
ÃÆâ€ââ€
(unregistered)
|
You win the internets. Well-played... |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:09
•
by
Someone You Know
|
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? |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:18
•
by
The Maths
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:26
•
by
Dude
(unregistered)
|
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 |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:29
•
by
Crash Magnet
(unregistered)
|
|
Does 0.999... = 1?
How about 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 |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:30
•
by
If maths was politics
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:35
•
by
Crash Magnet
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:36
•
by
fjf
(unregistered)
|
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). So for those who believe 0.999... != 1, what would be the average of those two numbers? |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:39
•
by
boog
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:43
•
by
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... ...like I do. ;) |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:45
•
by
Severity One
|
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.
...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. :) |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:55
•
by
Coyne
|
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 |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:55
•
by
boog
(unregistered)
|
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". And now my head hurts. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:56
•
by
Markp
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 15:58
•
by
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 </table> myself to ensure that it got closed.
The </div> could very well be a valid fix for something like that (not in NoScript tags however). |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:00
•
by
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.
|
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:01
•
by
The Maths
(unregistered)
|
|
I was not calling your argument moronic, I said the argument itself is moronic.
|
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:02
•
by
Gargo
(unregistered)
|
Maybe it is intended to be used as a parameter (like a #define) to a function e.g.:
|
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:03
•
by
Someone You Know
|
I'm sorry, but I have no idea what point you're trying to make here. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:14
•
by
hatterson
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:17
•
by
hatterson
|
Haha, well done sir. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:24
•
by
Not a math major
(unregistered)
|
If you add each digit in the number it's prime: 2 + 1 + 5 = 7 |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:27
•
by
boog
(unregistered)
|
|
Fair enough, it's valid syntax in both C# and Java.
But you said it is Java.
And you clarified your argument, for those of us who are "running in the correct Universe":
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.
Isn't that more accurate? |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:29
•
by
anon
(unregistered)
|
If 1=0. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:30
•
by
Not a math major
(unregistered)
|
WIN!! |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:35
•
by
hatterson
|
This is likely the best comment I've seen on here in a good long while. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:41
•
by
fjf
(unregistered)
|
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 ... |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:42
•
by
neminem
(unregistered)
|
No, it wouldn't. "Jewish" is a rather vague term: it's a religion, a culture, and a race. You can be Jewish because your parents and their parents and their parents, etc., were all Jewish. You can be Jewish because you were raised Jewish. Or you can be Jewish because you believe in the truth of the Old Testament but not the New Testament. See also: http://en.wikipedia.org/wiki/Jewish_atheism http://en.wikipedia.org/wiki/Humanistic_Judaism http://en.wikipedia.org/wiki/Secular_Jewish_culture P.S. I believe the term is "insensitive clod". |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 16:52
•
by
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 17:02
•
by
MG
(unregistered)
|
|
Also, since .9999.... = .9 + .09. + .009 + ..., an infinite geometric series with ratio .1 that has a finite sum.
Since the sum is the first term divided by 1 less the ratio between the terms (see Wikipedia link for proof), we get sum = .9 / (1 - .1) = .9 / .9 = 1. QED |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 17:03
•
by
Maurits
|
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) |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 17:12
•
by
boog
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 17:12
•
by
The Maths
(unregistered)
|
You seem to know quite a bit about the maths, so I'm assuming you think your silly number games are clever. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 18:00
•
by
Guiro
(unregistered)
|
|
IsAlphaNumeric = IsAlphaOrNumeric = !IsAlpha & !IsNumeric (apparently)
Therefore !IsFunny & !IsInsightful = IsFunnyOrInsightful |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 18:12
•
by
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 18:12
•
by
DaveK
|
^^^ 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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 18:17
•
by
DaveK
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 18:53
•
by
Ouch!
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 19:15
•
by
stu
(unregistered)
|
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! |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 19:17
•
by
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! } |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 19:19
•
by
Maurits
|
|
// warning: calling getSelf may make you go blind
|
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 19:49
•
by
nonpartisan
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 19:49
•
by
LB
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 19:51
•
by
Henning Makholm
(unregistered)
|
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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 20:01
•
by
Sam
(unregistered)
|
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! |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 20:07
•
by
Kuba
|
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: 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. |
Re: ISelfAware, Very Thorough, Crazy Hashmaps, and More
2010-09-29 20:13
•
by
Kuba
|
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. |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |