Closed Kolobamanacas closed 1 year ago
Whether it would be better to return NaN is a moot point here as the power operation intentionally defers to Math.pow
:
Math.pow(NaN, 0) // 1
Hmm, I see. I wasn't aware of this Math's behavior, thanks. I don't think it's correct either, but I guess it's not the place from where we could change it. :)
Repro steps:
I'm not sure whether this behavior is intentional or not, but it seems to me that any arithmetical operation including not-a-number must return not-a-number. Getting "1" creates false impression that operation is valid and was performed using valid operands, which, in my opinion, is not the case with not-a-numbers.