Comment

Comment by johndcook

Almost, but not quite. You could say "n! is the product of the natural numbers <= n." By this definition 0! is an empty product because there are no natural numbers <= 0.

However, this same reasoning would say (-1)! = 1, (-2)! = 1, etc. And while you could define negative factorials that way, it's better in practice to leave negative factorials undefined.

parent johndcook 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton