10 divided by 3 *multiplied with 3 is not 10 again??
-
You are right. But it's not the answer of the original question. Imagine a computer in an endless-loop producing numbers for a lotary. Then the possibility is Lt n->∞ 1/n that is 0 - but not impossible!!
A computer will not be able to generate an infinite number of numbers. Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe, so the computer will stop working at sometime in the future. Till then a huge amount of numbers would have been produced but not infinite. By definition, infinity can not be generated. Get hold of a high school maths books.
-
A computer will not be able to generate an infinite number of numbers. Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe, so the computer will stop working at sometime in the future. Till then a huge amount of numbers would have been produced but not infinite. By definition, infinity can not be generated. Get hold of a high school maths books.
The matter is, that the possibility of 0 is not equal to impossible. That's it:-D Yout example with energy and so on - that's no prove. Write down the number of 10 / 3 without something like symbols. You will not suceed - but it exists of course. No computer can do this. And multiplied with 3 it is 10 of course.
-
A computer will not be able to generate an infinite number of numbers. Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe, so the computer will stop working at sometime in the future. Till then a huge amount of numbers would have been produced but not infinite. By definition, infinity can not be generated. Get hold of a high school maths books.
avsrivastava wrote:
Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe
:-D You could explain him that a computer can have only a finite amount of memory, and anyway it would need infinite time to generate an infinite sequence of numbers. The amount of energy in the universe is way too complicated for this topic, I think. :)
________________________________________________ Tozzi is right: Gaia is getting rid of us. Personal Blog [ITA] - Tech Blog [ENG] Developing ScrewTurn Wiki 1.0 final, now in English, Italian and German.
-
avsrivastava wrote:
Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe
:-D You could explain him that a computer can have only a finite amount of memory, and anyway it would need infinite time to generate an infinite sequence of numbers. The amount of energy in the universe is way too complicated for this topic, I think. :)
________________________________________________ Tozzi is right: Gaia is getting rid of us. Personal Blog [ITA] - Tech Blog [ENG] Developing ScrewTurn Wiki 1.0 final, now in English, Italian and German.
-
Yesterday I questioned, if the possibility of 0 will mean impossible. I dont think so. If you have an infinite number of choices and take one, the possibility is 1 / infinite = 0 but not impossible. All of you said, that 1 / infinite is nearly 0, but not 0. That's astonishing me. So if 10 / 3 = Charly, and Charly * 3 = result, the result is nearly 10, but not 10???
There is no number called infinity. You can say stuff like "I wonder what happens with the expression 1/x as x grows towards infinity". Infinity is not a number - you cannot define it, nor can you define any expressions treating infinity as a number. Hence, nobody can say anything about 1/infinity - because it's jibberish. If the expression is 1/x, and x grows towards infinity, then the value of that expression approaches 0. This is basic high school mathematics... 10/3 is also unrepresentable with real numbers (unless you use fancy notations - but then you're not using real numbers, but a modified version). The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish. Pick any number, and I'll counter with an even bigger one. For eternity if I must. ;P
-- Deciphered from crop circles
-
You are right. But it's not the answer of the original question. Imagine a computer in an endless-loop producing numbers for a lotary. Then the possibility is Lt n->∞ 1/n that is 0 - but not impossible!!
It isn't 0, it approaches 0.
ensger wrote:
Imagine a computer in an endless-loop producing numbers for a lotary.
For 1/x, computers will not be able to maintain enough precision to keep the expression's value above 0. A computer does not have infinite memory... (its CPU registers certainly does not!)
-- For External Use Only
-
The matter is, that the possibility of 0 is not equal to impossible. That's it:-D Yout example with energy and so on - that's no prove. Write down the number of 10 / 3 without something like symbols. You will not suceed - but it exists of course. No computer can do this. And multiplied with 3 it is 10 of course.
ensger wrote:
No computer can do this. And multiplied with 3 it is 10 of course.
Sure it can. Have you ever used the computer language Scheme? Last time I checked, it handled fractional numbers quite well.
-- For External Use Only
-
avsrivastava wrote:
Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe
:-D You could explain him that a computer can have only a finite amount of memory, and anyway it would need infinite time to generate an infinite sequence of numbers. The amount of energy in the universe is way too complicated for this topic, I think. :)
________________________________________________ Tozzi is right: Gaia is getting rid of us. Personal Blog [ITA] - Tech Blog [ENG] Developing ScrewTurn Wiki 1.0 final, now in English, Italian and German.
Oh, I had a feeling that for someone who has problem understanding highschool maths would have problems being convinced that a finite amount of memory cannot be used to achieve it. (and I was right) So, I used the trivial upper bound, which binds everything countable/measurable to finiteness. Now I will just give up.
-
Yesterday I questioned, if the possibility of 0 will mean impossible. I dont think so. If you have an infinite number of choices and take one, the possibility is 1 / infinite = 0 but not impossible. All of you said, that 1 / infinite is nearly 0, but not 0. That's astonishing me. So if 10 / 3 = Charly, and Charly * 3 = result, the result is nearly 10, but not 10???
Back in the day, I had to write a Pascal function called "AlmostEqual". I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings. We needed different precisions depending on where we were in the math calculations. My suggestion is to NOT check doubles for equality without doing something along the same lines.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I would say, the computer doesn't need on infinite amount of memory, but we need an infinite amount of paper to print the result:-D
You can overcome the problem of infinite paper by the computer showing you a number each time and you could just memorize it. What is the need to print it to paper? :mad:
-
There is no number called infinity. You can say stuff like "I wonder what happens with the expression 1/x as x grows towards infinity". Infinity is not a number - you cannot define it, nor can you define any expressions treating infinity as a number. Hence, nobody can say anything about 1/infinity - because it's jibberish. If the expression is 1/x, and x grows towards infinity, then the value of that expression approaches 0. This is basic high school mathematics... 10/3 is also unrepresentable with real numbers (unless you use fancy notations - but then you're not using real numbers, but a modified version). The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish. Pick any number, and I'll counter with an even bigger one. For eternity if I must. ;P
-- Deciphered from crop circles
Jörgen Sigvardsson wrote:
The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish.
I learned that it can be written as 3.3. Was my teacher wrong? :suss:
Cheers, Vikram.
"whoever I am, I'm not other people" - Corinna John.
-
Back in the day, I had to write a Pascal function called "AlmostEqual". I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings. We needed different precisions depending on where we were in the math calculations. My suggestion is to NOT check doubles for equality without doing something along the same lines.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings.
Wow, now that's a hack. Wouldn't it be nicer to do something like this?
bool AlmostEqual(double a, double b, int decimalPlaces)
{
double diff = 0f;
for(int i=0; iOr would this be inaccurate again?
-
Jörgen Sigvardsson wrote:
The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish.
I learned that it can be written as 3.3. Was my teacher wrong? :suss:
Cheers, Vikram.
"whoever I am, I'm not other people" - Corinna John.
No he wasn't wrong, but it's not a real number either, and not very intuitive for further computations. What is 0.36 times 33? Took you a while eh? What is 4/11 times 33? :)
-- Hey, TiVo! Suggest this!
-
Back in the day, I had to write a Pascal function called "AlmostEqual". I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings. We needed different precisions depending on where we were in the math calculations. My suggestion is to NOT check doubles for equality without doing something along the same lines.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001I often write functions like this:
bool FuzzyEqual(double l, double r, double fuzz) {
return abs(l - r) < fuzz;
}Then I adjust the "fuzz" in accordance to the needed precision.
-- Secreted by the Comedy Bee
-
Yesterday I questioned, if the possibility of 0 will mean impossible. I dont think so. If you have an infinite number of choices and take one, the possibility is 1 / infinite = 0 but not impossible. All of you said, that 1 / infinite is nearly 0, but not 0. That's astonishing me. So if 10 / 3 = Charly, and Charly * 3 = result, the result is nearly 10, but not 10???
0 is not a number so dividing any number by 0 returns "not a number" in mathematical terms(abbr. NaN). Elaine :rose:
-
John Simmons / outlaw programmer wrote:
I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings.
Wow, now that's a hack. Wouldn't it be nicer to do something like this?
bool AlmostEqual(double a, double b, int decimalPlaces)
{
double diff = 0f;
for(int i=0; iOr would this be inaccurate again?
That's quite inefficient.. :~
-- Featuring GRATUITOUS ALIEN NUDITY
-
0 is not a number so dividing any number by 0 returns "not a number" in mathematical terms(abbr. NaN). Elaine :rose:
0 is not a number? I think you need to revisit and revise your post... ;)
-- For External Use Only
-
0 is not a number? I think you need to revisit and revise your post... ;)
-- For External Use Only
Technically, 0 is lack of a number. The romans didn't have 0 which limited them mathematically (it was actually invented in India and spread to Europe via Arab traders). Elaine :rose:
-
Technically, 0 is lack of a number. The romans didn't have 0 which limited them mathematically (it was actually invented in India and spread to Europe via Arab traders). Elaine :rose:
-
No he wasn't wrong, but it's not a real number either, and not very intuitive for further computations. What is 0.36 times 33? Took you a while eh? What is 4/11 times 33? :)
-- Hey, TiVo! Suggest this!
Actually, in mathematics 0.3 is a real number. To a computer with limited precision it cannot be accurately represented, but in general infinitely repeating decimals are definitely real. Even things like pi and e are real numbers even though all their digits cannot be computed. That's what makes the set of real numbers bigger then the set of rational numbers.
and of course [they] outsource their technical support to a land where English bears little resemblance to the language I speak - Christopher Duncan