June Liu wrote:
>
> Hi,
>
> I'm using SpiderMonkey (JavaScript-C engine) in my application. Lately, a
> problem has shown while using big integer number.
> -------------------------------------------------------------
> JSVAL has integer range from -1073741812 to 1073741811, but C integer
> allows range from -2147483648 to 2147483647.
> ------------------------------------------------------------
>
> It appears the integer in JS engine in one bit shorter than C integer
> type. Does you see this problem too? And is there any patch I can pick up
> for a fix?
>
> --June
This is not a bug. It is an implementation detail inherent in the
nature of jsvals as type-tagged values. Greater range can be had
when needed by using doubles. This is transparent to executing JS
code.
A better place to discuss this is in the jseng group...
news://news.mozilla.org/netscape.public.mozilla.jseng
John.