-----Original Message----- From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of Danny Yoo Sent: Thursday, July 25, 2002 10:42 To: Kirby Urner Cc: edu-sig@python.org Subject: Re: [Edu-sig] Update from Urner [why 0**0 == 1?]
Question: why do both J and Python define 0**0 (or 0^0 in J) to be 1, when mathematicians (and Wolfram's Mathematica) call this undefined?
Concrete Mathematics actually covers a reason for defining 0**0 as 1 in the chapter on binomial coefficients --- I think it's somewhere in Chapter 5. Although the functions 0**x and x**0 have different limiting values as x approaches zero, we should define 0**0 == 1 so that the binomial theorem: (x+y)**r = sum_k (n choose r) (x**r) (y **(n-r)) works for all r >= 0, even if x == -y. If you have The Art of Computer Programming Volume 1 handy, see section 1.2.6 on the explanation of the binomial theorem, and you'll see it. Hope this helps! _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig