+ 2

Why the calculation2's result is NaN, and not a number?

https://code.sololearn.com/c49t3o9c78Dm/?ref=app

31st Aug 2018, 5:48 PM
Gabriel Felix dos Santos
Gabriel Felix dos Santos - avatar
4 Antworten
+ 6
Your problem lies in this part of your code: Math.pow(11887, 17197) The result of that is 'infinity.' The remainder of infinity is infinity, and that isn't a number.
31st Aug 2018, 5:59 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
Oh, I got it. Thank you so much
31st Aug 2018, 6:01 PM
Gabriel Felix dos Santos
Gabriel Felix dos Santos - avatar
+ 2
bcz it will not calculate that power.. instead used infinity %x.. NaN that is undefined..
3rd Sep 2018, 7:25 PM
Aarav Raj
Aarav Raj - avatar
- 1
nan is like a zero infinitly in minecraft nan can exist youtube channel antvenom thx!
1st Sep 2018, 6:12 PM
David Alvaro
David Alvaro - avatar