In JavaScript, I was curious to know what possible maximum number can be represented in scientific notation without finally getting "Infinity", so I wrote a small program and recognized it
17976931348623158079372897140530341507993413271003782693617377898044496829276475094664901797758720709633028641669288791094655554785194040263065748867150582068190890200070838367627385484581771153176447573027006985557136695962284291481986083493647529271907416844436551070434271155969950809304288017790417449779
which can be reduced to 1.7976931348623157e + 308.
My question is: what makes this particular number the maximum possible in JavaScript? Is it hardware-dependent (possibly 64 bit maximum?) Or language specific? Why exactly 308 maximum net power of 10?
And also, how different is it from other languages?
source
share