Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After reading this I think a mathematically sound approach is to leave 0^0 undefined.

Then because of practicality define 0^0 = 1 accepting some weirdness around 0^0 (limits to 0^0 not being 1).

With "practicality" I mean for mathematicians the convenience for some definitions, perhaps like this: "While we know that 0^0 is undefined, we proceed with the definition 0^0 = 1, because in our domain the disconuity doesn't matter [...]". This could be a footnote.

For programmers just let the pow() function(s) return 1.

It's a pity (or in a more positive way: spicy) that nature doesn't hold the principle of the least surprise. It's something we can't or shouldn't fix.



I think that you are overcomplicating the underlying reasoning. Consider: How many functions are there from the empty set to the empty set? One, right?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: