|
|
Re: 0^0=1
Posted:
May 3, 2012 1:39 PM
|
|
On May 3, 8:16 am, Gus Gassmann <horand.gassm...@googlemail.com> wrote: > On May 2, 11:29 pm, Dan Christensen <Dan_Christen...@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! > > > > 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? > > I see. Nothing of substance to contribute, so you go after the person. > Doesn`t exactly strengthen your position, you know.
It just seemed that you were trying to bluff your way through this, Gus. What you said made no sense. "Better to program, compile and execute?" "Artificial" if statements? Really now.
Besides, you started it with your snide "surely even you can understand..." I tend to respond in kind.
Dan Download my DC Proof 2.0 software at http://www.dcproof.com Also see video demo
|
|