我们都知道0 0是不确定的.
但是,javascript说:
Math.pow(0, 0) === 1 // true
Run Code Online (Sandbox Code Playgroud)
和C++说同样的话:
pow(0, 0) == 1 // true
Run Code Online (Sandbox Code Playgroud)
为什么?
我知道:
>Math.pow(0.001, 0.001)
0.9931160484209338
Run Code Online (Sandbox Code Playgroud)
但为什么不Math.pow(0, 0)抛出错误呢?或者也许NaN会比...更好1.