Performance and style advice requested

IMHO rather:
@facts = [0,1]

Hmmm … I’m pretty sure 0! = 1

···


– Jim Weirich / Compuware
– FWP Capture Services
– Phone: 859-386-8855

It is, at least according to wolfram, which I’m inclined to believe.

···

— “Weirich, James” James.Weirich@FMR.COM wrote:

IMHO rather:
@facts = [0,1]

Hmmm … I’m pretty sure 0! = 1


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

“Weirich, James” James.Weirich@FMR.COM schrieb im Newsbeitrag
news:1C8557C418C561429998C1F8FBB283A721CC13@MSGDALCLB2WIN.DMN1.FMR.COM

IMHO rather:
@facts = [0,1]

Hmmm … I’m pretty sure 0! = 1

Thanks for refreshing my math knowledge!

robert

It is, at least according to wolfram, which I’m inclined to believe.
the real interesting thing is figuring out why it must be so,
nikolai

···


::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,php,war3 :::
main(){printf(&linux[“\021%six\012\0”],(linux)[“have”]+“fun”-97);}

Undoubtedly, but that’s a bit beyond me, I’m afraid. =)

···

— Nikolai Weibull lone-star@home.se wrote:

It is, at least according to wolfram, which I’m inclined to
believe.

the real interesting thing is figuring out why it must be so,


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

“Nikolai Weibull” lone-star@home.se schrieb im Newsbeitrag
news:20030915212812.GF4185@puritan.pcp.ath.cx…

It is, at least according to wolfram, which I’m inclined to believe.
the real interesting thing is figuring out why it must be so,
nikolai

Maybe because of the combinatorial formula n over k = n! * (n-k)! / k!
which for k == n leads to n! * 0! / n! which should be 1 and not 0.

Cheers

robert

Michael Campbell wrote:

It is, at least according to wolfram, which I’m inclined to
believe.

the real interesting thing is figuring out why it must be so,

Undoubtedly, but that’s a bit beyond me, I’m afraid. =)

Not particularly. It’s one of those things where, once you
see it, it’s no big deal.

Unfortunately, I can’t remember exactly how it works.

There are formulae that involve (n-k)!, perhaps in the
denominator, I can’t recall. And in the degenerate case
where n=k, “common sense” tells us that we get the right
answer if 0! is arbitrarily defined to be 1. So we do that.

At least, I think that’s how it works. The more math
background you have, the more you may grind your teeth at
my generalization.

Hal

···

— Nikolai Weibull lone-star@home.se wrote:

0! represents the number of possible permutations of 0 elements, which
is 1.

See:

http://mathworld.wolfram.com/Factorial.html

Regards,

Mark

Hal,

Unfortunately, I can’t remember exactly how
it works.

There are formulae that involve (n-k)!,
perhaps in the denominator, I can’t recall.
And in the degenerate case where n=k,
“common sense” tells us that we get the
right answer if 0! is arbitrarily defined
to be 1. So we do that.

Pretty much any way you define the factorial function, you always end up

with some form of the relationship:

X! = X * (X - 1)!

Or, put another way:

(X - 1)! = X! / X

So, for X == 1:

0! = 1! / 1

- Warren Brown

Mark Wilson wrote:

0! represents the number of possible permutations of 0 elements, which
is 1.

Well either that or ZERO!, NONE!, I mean it!

Seems that that’s what I find myself shouting at my 2 year old anyway.

Scott