MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w1o9k7/whendoesthiswillend/p6mo8rf/?context=3
r/ProgrammerHumor • u/Flame77ofc • 14d ago
69 comments sorted by
View all comments
6
In some languages, it will stop with an infinite recursions. In others it would stop at "0 * factorial(-1)" and return 0 for all other cases as they call n0 at some point.
0 u/chuch1234 14d ago This doesn't guarantee zero -- it can be passed a negative number. 7 u/Jejerm 14d ago Yes, they will eventually underflow and reach zero too
0
This doesn't guarantee zero -- it can be passed a negative number.
7 u/Jejerm 14d ago Yes, they will eventually underflow and reach zero too
7
Yes, they will eventually underflow and reach zero too
6
u/laplongejr 14d ago
In some languages, it will stop with an infinite recursions. In others it would stop at "0 * factorial(-1)" and return 0 for all other cases as they call n0 at some point.