Mathamatical reasoning

# Thread: Mathamatical reasoning

1. Senior Member
Join Date
Dec 1969
Posts
6,476

## Mathamatical reasoning

Is it totaly impossible to Divide by 0?<BR><BR>Not just talking asp here, <BR>(altho one would think they would have written a function to handle it)...<BR><BR>But also referring to every darn piece of electronics....<BR><BR>There must be some deep reasoning behind it??<BR>

2. Senior Member
Join Date
Dec 1969
Posts
257

## No.

IIRC, the result of dividing by 0 is infinity. <BR><BR>Bill can confirm or deny this for certain.

3. Senior Member
Join Date
Dec 1969
Posts
96,118

## No such thing...

...now, there *is* mathEmatical reasoning. &#060;snicker/&#062;<BR><BR>Yes, it&#039;s impossible to divide by zero.<BR><BR>Here&#039;s how to think of it:<BR><BR>What is the result of<BR> 1 / N<BR>as N gets smaller and smaller?<BR><BR>Consider:<BR> 1 / 1 --&#062;&#062; 1<BR> 1 / 0.1 --&#062;&#062; 10<BR> 1 / 0.00001 --&#062;&#062; 100000<BR> 1 / 10^-100 --&#062;&#062; 10^+100 (a googol, a 1 with 100 zeroes after it)<BR> 1 / 10^-1000000000 --&#062;&#062; 10^+1000000000 (a 1 with a billion zeroes after it)<BR><BR>so the closer you get to zero, the larger the answer, right?<BR><BR>So zero is the smallest possible number. And 1 divided by zero is the largest possible number. And what do you thing the largest possible number is? The old answer used to be "infinity". Nowadays, we tend to say "undefined".<BR><BR>Anyway, suffice to say that there is no way to represent that largest possible number in a finite number of digits...or in a finite number of bits in a computer.<BR><BR>***********<BR><BR>It reminds me of a funny joke/idea I heard recently:<BR><BR>Remember the old song "99 bottles of beer on the wall"? It&#039;s fine, but it gets down to zero too quickly.<BR><BR>So try this variation:<BR><BR>"Infinity bottles of beer on the wall,<BR> Infinity bottles of beer!<BR> Take one down and pass it around, <BR> Infinity bottles of beer on the wall."<BR><BR>And that&#039;s because infinity minus any number is infinity. Yes, even infinity minus infinity is still infinity.<BR><BR><BR>

4. Senior Member
Join Date
Dec 1969
Posts
96,118

## And just incidentally...

Let&#039;s say that 1/0 is *not* infinity.<BR><BR>Let&#039;s assume it is some great big number.<BR><BR>Okay, how would you represent it in a computer?<BR><BR>We already saw that:<BR> 1 / 10^-1000000000 --&#062;&#062; 10^+1000000000 (a 1 with a billion zeroes after it)<BR><BR>How about we divide by a googolplex, instead? That a googol (recall: a 1 with 100 zeroes after it) raised to the 100th power! <BR><BR>Consider: A googol squared has 200 zeroes after it. Cubed, it has 300 zeroes after it.<BR><BR>Put it another way: There are more than a googol atoms in the universe but almost surely fewer than a googolplex.<BR><BR>Okay, so now how does the computer represent a number that big?<BR><BR>If it takes more bits of information than there are atoms in the universe?<BR><BR>Mathemeticians can play with this stuff all day long, because they have the ABSTRACT math notation to let them do so. Computers want/need concrete results. [Okay, probably excepting for a few esoteric languages we&#039;ve never heard of that are used only by these nutso mathematicians and which use the same abstract symbology.]<BR><BR>Nutso mathematicians. Did I mention my degree was in Math? Fortunately, so long ago that I&#039;ve forgotten almost everything.<BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
6,476

## RE: And just incidentally...

Yes I understand that... Some of it anyways...<BR><BR>But why cant there have been a work around or something...<BR><BR>I just wrote a work around so that if script ended up trying to devide by 0 it would not error... and crash whole script...<BR><BR>Calculators spit out err. Computers, scripts, just about anything I can thinnk of spits out error...<BR><BR>Just seems to me that in todays day in technology someone would have done something with it...<BR><BR>I know it seems a pretty simple question, but not so simple when one sits down and thinks about it...<BR><BR>Hell, up until a year or 2 ago we thought 100/3 = 33.333infinity...<BR><BR>

6. Senior Member
Join Date
Dec 1969
Posts
10,852

## RE: And just incidentally...

&#062;Hell, up until a year or 2 ago we thought 100/3 = 33.333infinity...<BR><BR>Refresh my memory....What did we figure out it actually is?

7. Senior Member
Join Date
Dec 1969
Posts
5,955

## Well, 1/0 is actually undefined...

...and not infinity, otherwise you have the following problem:<BR><BR>1/x = y<BR><BR>Multiply by x on both sides:<BR><BR>1 = y*x<BR><BR>That&#039;s fine so far. Now put x = 0 and y = infinity and you get:<BR><BR>1 = infinity * 0<BR><BR>That&#039;s certainly not true. If it was, then you could also say:<BR><BR>2/0 = infinity =&#062; 2 = infinity * 0<BR>3/0 = infinity =&#062; 3 = infinity * 0<BR><BR>As you can see, that doesn&#039;t work.<BR><BR>However, you can say that 1/x goes towards infinity as x goes towards zero, but that doesn&#039;t mean that for x = 0 the result of 1/x is infinity.<BR><BR>The reason why script error when you divide by zero is because different situations have to be dealt with in different ways. In some situations you&#039;d like 1/x to be 0 and not infinite, in others you want it to be the largest possible number and in others again you don&#039;t want it to work at all. Since a computer language can&#039;t predict what you need, it does the sensible thing and errors.<BR><BR>Now, lets see who is going to contradict me and how long we can keep the discussion going.<BR><BR>;-)<BR><BR>Oliver.

8. Senior Member
Join Date
Dec 1969
Posts
96,118

## I *did* say that...

...but "undefined" is even harder for most people to grasp than is "infinity".<BR><BR>When I was in 10th grade, our math teacher (had same one 10th thru 12th) used "infinity" as answer. But in 11th grade she shifted to "undefined". She&#039;d been to a workshop over the summer and they were just then encouraging math teachers to use the formally correct term. So as I said, the answer *used* to be given as "infinity." If not among true mathematicians, at least among the lay public.<BR><BR>

9. Senior Member
Join Date
Dec 1969
Posts
96,118

## HUH??????? WHAT?????

&#062; Hell, up until a year or 2 ago we thought 100/3 = 33.333infinity...<BR><BR>Ummm...personally, I *still* think that! WHAT are you talking about?<BR><BR>And yes, there is a solution. JavaScript uses it, for example.<BR><BR>Try it!<BR><BR>&#060;SCRIPT Language=JavaScript&#062;<BR>alert( 1/0 );<BR>&#060;/SCRIPT&#062;<BR><BR>Of course, it gets the WRONG answer, from the mathematical viewpoint. &#060;grin/&#062;<BR><BR>

10. Senior Member
Join Date
Dec 1969
Posts
11,247

## 1/1/1900 00:00 that's when

;-) Database people will understand

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•