Subj : spidermonkey: are integers (mathematical sense) always stored in To : netscape.public.mozilla.jseng From : Jens Thiele Date : Fri Nov 12 2004 02:12 pm I just was surprised that evaluating javascript code like "var x=10.0;Math.sqrt(x*x*x*x);" or perhaps a better example: "var x;x=100.0;" results in an integer jsval (tagged an shifted of course) and in jsmath.c always js_NewNumberValue is used to return values which first tries to fit the number into an jsval Is this "normalization" something one can count upon? => is the following statement true? if a Number was somehow generated by spidermonkey and it is an integer (in the mathematical sense) that fits in an jsval then it will always be stored directly in the jsval? Jens PS: is there something related in the ecma spec? .