rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
732 stars 135 forks source link

Updated documentation to note the pow(0, 0) case. #79

Closed meltinglava closed 6 years ago

meltinglava commented 6 years ago

Ref #78

hauleth commented 6 years ago

Quoting prof Knuth:

On the other hand, Cauchy had good reason to consider 0^0 as an undefined limiting form, in the sense that the limiting value of f(x)^g(x) is not known a priori when f(x) and g(x) approach 0 independently. In this much stronger sense, the value of 0^0 is less defined than, say, the value of 0 + 0. Both Cauchy and Libri were right, but Libri and his defenders did not understand why truth was on their side.

https://arxiv.org/abs/math/9205211

cuviper commented 6 years ago

@hauleth It's not clear to me if you're quoting that in favor or against, or just representing the debate.

Anyway, commenting the existing behavior is harmless.

bors r+

bors[bot] commented 6 years ago

Build succeeded

hauleth commented 6 years ago

@cuviper my comment was in favour of current behaviour as I think it is more reasonable solution in case of computation. pow(0, 0) is "mathematically undefined" when we are working in area of mathematical analysis, and in such case num crate isn't that much helpful. We could quote this paper as a reasoning for current behaviour and why we think it is acceptable for us.