I WANT to make a variable go to infinity. How do I go about This?
Offline
Forever
Change Variable by 1
Now wait....
Offline
If you combine Mayhem's method with Paddle2See's method, you'll get there even faster...
Seriously, though infinity is not really a number, it's a symbol we use to talk about numbers. Plus there's many (at least two) different infinities, each having their own "cardinality." For example, there is the infinity of the integers (1, 2, 3...) and then there's the infinity of the real number line.
Last edited by chalkmarrow (2008-01-30 21:35:28)
Offline
I modified my last post, Jens, to remove the reference to the now-fixed infinity bug...
Offline
Problem is, you can't get to infinity by adding finite numbers. Unless, as Mayhem points out, you are willing to wait an infinite amount of time for the "result".
Some philosophical discussion of Paddle2's suggestion, and infinity:
http://mathforum.org/dr.math/faq/faq.divideby0.html
-MrEd
Last edited by EdnaC (2008-01-31 14:56:59)
Offline
Hmmm. So following EdnaC's link, Dr. Math says that dividing by zero does not give you infinity because the operation is not defined. So maybe I should say that to get to infinity you should divide by successively smaller numbers approaching zero as a limit?
Offline
Dividing by zero is defined in scratch as returning infinity. This may not lead to a completely consistent mathematical system, but it is what IEEE floating-point math standards require.
Offline
I guess the IEEE had to decide on something for divide by zero. But I'm pretty sure I can't use the IEEE "standard" for infinity and multiply it by zero to get my original number back!
1/0 = "IEEE Infinity" therefore 0 * "IEEE Infinity" = 1
and also,
2/0 = "IEEE Infinity" therefore 0 * "IEEE Infinity" = 2
So now, we have an infinite number of "infinities"...............
I'm still wondering why anim8tr wanted a variable to go to infinity, does it do something really nifty when it gets there?
-MrEd
Last edited by EdnaC (2008-01-31 22:21:42)
Offline
Scratch does display infinity nicely in the variable display now.
I believe that IEEE floating-point supports 2 infinities: positive and negative, and another value NaN (not a number), for things that really can't be defined (like 0/0 or 0*infinity).
Offline
Pretty neat, I constructed a loop to send a variable to infinity and pretty quickly got there:
Green Flag:
Set Big to 2
Forever
Change Big by Big*2
It happened pretty fast, it looks like "infinity" was reported once the value exceeded the size of a "Double" (64bit floating point number). Not really very spectacular, and definitely not satisfying to mathmatics philosophers, but 1.8X10^308 is close enough for me.
Out of curiosity, I googled to learn about the IEEE's decision on defining "divide by zero". There is some contention on that decision.
http://standards.ieee.org/reading/ieee/interp/754-1985.html
The IEEE decision is defended using the method Paddle2 suggested (dividing by successively smaller numbers) on the grounds that what the programmer "wanted" just couldn't be represented by the numbers available (a Double can be a really tiny number, but the programmer must have wanted one that was even smaller). Dr Math would not be pleased!
-MrEd
Last edited by EdnaC (2008-02-01 07:43:16)
Offline