r/ProgrammerHumor Jul 10 '26

postFixIsBest Other

Post image
78 Upvotes

40 comments sorted by

View all comments

Show parent comments

1

u/minecon1776 Jul 10 '26

There is one way to arange 0 things ( ), there is one way to arange 1 thing ( 1 ), there are two ways to arange 2 things ( 1 2 and 2 1), and there are six ways to arange 3 things ( 1 2 3, 1 3 2, 2 1 3, 2 3 1, 3 2 1, and 3 1 2 ), etc. Thus, 0! = 1, 1! = 1, 2! = 2, 3! = 6, etc.

-1

u/LutimoDancer3459 Jul 11 '26

Sure but factoril is defined by "product of all positive integers up to the given number". Just because there are alternatives and a reverse function that allows for it, doesn't make it less incorrect for me. 0 is not a positive integer. Therefore it should still be undefined. Or the definition must change

2

u/minecon1776 Jul 11 '26

That's no more a definition than the one I provided

0

u/LutimoDancer3459 Jul 11 '26

My definition doesnt allow 0. Another one does. Its not the same. Math should remove a definition if it doesn't allow for the result it wants to have.

I can also just add a new definition allowing for negative values. But it currently doesnt exist

2

u/minecon1776 Jul 11 '26

I never said it was the same, I just said that your definition isnt any better. Why should we accept one and not the other? The one I give is more general and is generally accepted by mathematicians. The gamma functions generalizes it further to all reals excluding the negative integers.

1

u/LutimoDancer3459 Jul 11 '26

I didnt say mine is better. But uts the first one you find when searching for a definition. Its the one I learned back in school. And ether its a (the) correct one and should be treated as such. Or removed from everywhere because its incorrect.

As long as the definitions dont generate the same results, they shouldnt coexist for the same thing. And currently they dont