At 05:57 PM 3/10/2002 -0500, Simon Glover wrote:

>   In Parrot's standard operational mode, the following code[1]:
>
>         set     N2, -2147483648.0
>         set     I2, N2
>         print   I2
>         print   "\n"
>         end
>
>  produces the output:
>
>   -2147483648
>
>  but in JIT mode (on an x86) it produces:
>
>   -0
>
>  This smacks of some kind of overflow problem, but I haven't the faintest
>  idea of where in jit.c to start looking.

Using 32bit representations, you just set the int value to 0x80000000
which is all 0 with the sign bit set. For floating point the sign bit set,
with all zeroes indicates -0 in IEEE floating point.

In short, the output is correct for a 32bit float.

Maybe the JIT can be tweaked to use double precision floats as default.

-Melvin


Reply via email to