No such thing as a small change PerlMonks

Re: More Fun with Zero!

by lemming (Priest)
 on Jul 23, 2001 at 13:07 UTC ( #98938=note: print w/replies, xml ) Need Help??

in reply to More Fun with Zero!

According to this math link, there's still some discussion over what the result should be.

Update: it starts with
According to some Calculus textbooks, 0^0 is an "indeterminate form." What mathematicians mean by "indeterminate form" is that in some cases we think about it as having one value, and in other cases we think about it as having another.
which is slightly different than what ariels says. I guess I think 1994 is recent, but the real discussion took place in the 19th century...

However, read the link, don't let us read it for you.

Replies are listed 'Best First'.
Re: Re: More Fun with Zero!
by ariels (Curate) on Jul 23, 2001 at 13:10 UTC
The FAQ starts by stating 00 is what's known in calculus as an "indeterminate form", which makes sense for calculus, since xy isn't continuous at x=0,y=0. It then goes on to say:
Other than the times when we want it to be indeterminate, 0^0 = 1 seems to be the most useful choice for 0^0 . This convention allows us to extend definitions in different areas of mathematics that would otherwise require treating 0 as a special case.
It then gives a list of reasons why 1 is such a good choice.

It does not mention any recent discussion.

However there is a valid question over what we should get back from a computer when we calculate 00. If we are thinking in terms of doing an exact calculation, then there is no question, there is an answer we should give and that answer is 1. But if we are thinking in terms of floating point math, then what the computer should be designed in terms of is, I have a number close to 0 raised to the power of another number close to 0 and I need to give back something that I know is close to the answer.

In that case the computer should give up because the real answer might be anywhere between 0 and 1 inclusive.

Therefore of his examples, all of the answers make sense. The two products which are designed to be working with floating point extensively (ie Excel and his calculators) think in terms of round-off error and decide that they cannot give a reasonable answer. The remaining products are all programming tools, dealing with integers, and are assuming for one reason or another that they are dealing with an exact integer calculation. So all of them give back the answer 1.

(OK, I admit it, probably the calculators and Excel were designed by people who remembered that 00 was an indeterminate form but have no idea what that really means. But there are calculational contexts in which failing to give an answer in that case makes sense.)

I would think it's the other way around. Floating-point numbers are not exact, and there is a little fuzzyness to them because there is a finite number of bits. So, a value x in a register is really x±δ. If you compute f(x) and the function exists and is well-behaved for all points in the interval x-δ...x+δ, but happens to be undefined only at exactly x, then perhaps the caller really meant some other value in that range of uncertainty, and could not represent it exactly in the register. It makes sence to use the limit, when the limit is well-defined and the same for positive and negative directions.

For division by zero, division by a very very small number that got rounded to zero, if you did keep the actual number, would be an overflow anyway. The limit here is infinity. The negative and positive directions are not equal. It can't guess whether your number was actually a tad above zero or a tad under zero, and even if it did would get an overflow anyway, so it really can't help.

—John

Create A New User
Node Status?
node history
Node Type: note [id://98938]
help
Chatterbox?
 [SuicideJunkie]: talexb Apgrade is the highest point it will reach. They're informing you that it will all be downhill from here until the software hits a PEgrade, or impacts the terrain depending on the details of the orbit.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-07-25 18:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
I came, I saw, I ...

Results (376 votes). Check out past polls.