Reputation: 41
I need to calculate exponentials with higher number... 20^20
var x=20^20;
console.log(x); //shows 0
I'm assuming its overflowing it. I want to use any standard implementation like c# and java BigInterger class and also if possible to overload the operators +,- etc. so I can easily do the operations required. kindly suggest.
Upvotes: 0
Views: 42
Reputation: 58
It is not possible to overload the operators in Javascript.
For big integer library, you can take a look at https://github.com/jtobey/javascript-bignum
Upvotes: 1