Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Topic: 0^0=1
Replies: 145   Last Post: May 7, 2012 8:08 AM

 Messages: [ Previous | Next ]
 William Hale Posts: 48 Registered: 5/2/12
Re: 0^0=1
Posted: May 2, 2012 10:41 PM

In article
Dan Christensen <Dan_Christensen@sympatico.ca> wrote:

> On May 2, 6:13 pm, Gus Gassmann <horand.gassm...@googlemail.com>
> wrote:

> > On May 2, 5:33 pm, Dan Christensen <Dan_Christen...@sympatico.ca>
> > wrote:
> >

> > > Like I said, it depends on your application, but I don't see how you
> > > can sensibly assign any number to the sum or product of an empty list
> > > of numbers. Not from a programming perspective anyway.

> >
> > Holy smokes, Dan. I've seen you say some pretty asinine things, but
> > this one surely takes the cake.
> >
> > *Especially* from a programming perspective it makes eminent sense to
> > assign 0 to the sum of an empty list of numbers and 1 to the product:
> >

>
> From a programming perspective, if you aren't given anything to add or
> multiply how much sense does it make to return any numerical answer
> from a sum or product function? Get real!

But it is real. Same thing is done for the factorial of 0 and the
concatenation of an empty array of strings (i.e., the array is an array
of strings and the number of elements in the array happens to be zero).
In particular, 0 factorial is 1 and the concatenation of the string
array [] is "".

Likewise, the union of an empty collection of sets is the empty set,
while the intersection of an empty collection of sets is the universal
set (assuming that there is a universal set, or at least a set that
every set being talked about is a subset).

>
>

> > unsigned int n;
> > new double x[n];
> > double prod = 1, sum = 0;
> > for (j=0; j <n; j++)
> > {
> >     sum  = sum  + x[j];
> >     prod = prod * x[j];
> >
> > }
> >

>
> > Surely even you can understand that it is better to program, compile
> > and execute the loop in this form without any artificial if statement
> > to cater to special cases such as n=0 or n=1.

>
> Huh? You've never programmed anything more complicated than your alarm
> clock, have you, Gus?
>
> Dan
> Also see video demo

Date Subject Author
5/1/12 Jesse F. Hughes
5/1/12 David W. Cantrell
5/1/12 Dan Christensen
5/1/12 Dan Christensen
5/2/12 David W. Cantrell
5/2/12 Dan Christensen
5/2/12 Frederick Williams
5/2/12 Dan Christensen
5/2/12 Frederick Williams
5/2/12 Dan Christensen
5/2/12 Frederick Williams
5/2/12 Dan Christensen
5/2/12 Frederick Williams
5/2/12 Dan Christensen
5/2/12 Michael Stemper
5/2/12 Dan Christensen
5/2/12 Jussi Piitulainen
5/2/12 Frederick Williams
5/2/12 Frederick Williams
5/2/12 Rotwang
5/2/12 Dan Christensen
5/2/12 jbriggs444@gmail.com
5/2/12 Dan Christensen
5/2/12 Dan Christensen
5/2/12 William Hale
5/3/12 Dan Christensen
5/3/12 William Hale
5/3/12 Dan Christensen
5/3/12 William Hale
5/3/12 Dan Christensen
5/3/12 William Hale
5/3/12 Dan Christensen
5/3/12 mike3
5/3/12 Dan Christensen
5/3/12 Dan Christensen
5/3/12 Dan Christensen
5/4/12 Dan Christensen
5/4/12 Marshall
5/4/12 Dan Christensen
5/5/12 Marshall
5/5/12 Dan Christensen
5/6/12 Marshall
5/6/12 Dan Christensen
5/6/12 Frederick Williams
5/6/12 Marshall
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/4/12 Marshall
5/4/12 Dan Christensen
5/5/12 Frederick Williams
5/5/12 Dan Christensen
5/5/12 Marshall
5/5/12 Dan Christensen
5/6/12 Marshall
5/6/12 Dan Christensen
5/6/12 William Hale
5/6/12 Dan Christensen
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 Dan Christensen
5/6/12 Frederick Williams
5/6/12 Dan Christensen
5/7/12 Frederick Williams
5/6/12 William Hale
5/6/12 Dan Christensen
5/6/12 Frederick Williams
5/6/12 Marshall
5/6/12 Dan Christensen
5/6/12 Marshall
5/6/12 Dan Christensen
5/6/12 Frederick Williams
5/6/12 Dan Christensen
5/6/12 Butch Malahide
5/6/12 William Hale
5/6/12 William Hale
5/6/12 William Hale
5/6/12 Dan Christensen
5/6/12 Frederick Williams
5/6/12 Dan Christensen
5/6/12 billh04
5/6/12 Dan Christensen
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 LudovicoVan
5/6/12 Jussi Piitulainen
5/6/12 LudovicoVan
5/6/12 Jussi Piitulainen
5/6/12 LudovicoVan
5/6/12 Ki Song
5/6/12 Jussi Piitulainen
5/6/12 Jussi Piitulainen
5/6/12 Ki Song
5/6/12 Jussi Piitulainen
5/6/12 LudovicoVan
5/6/12 Ki Song
5/6/12 Jussi Piitulainen
5/6/12 Ki Song
5/6/12 William Hale
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 Jussi Piitulainen
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 William Hale
5/6/12 LudovicoVan
5/6/12 Ki Song
5/6/12 LudovicoVan
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 William Hale
5/6/12 LudovicoVan
5/6/12 Frederick Williams
5/6/12 Frederick Williams
5/3/12 Frederick Williams
5/3/12 Dan Christensen
5/4/12 Ki Song
5/4/12 Dan Christensen