J602 64 bit:
   (8!:2) _2147483648 NB. _2^32
-2.147483648e9
   (8!:2) _9223372036854775808 NB. _2^63
-'..--).0-*(+,))+(0(

Important but cryptic test:

   a. i. ": _9223372036854775808
95 57 50 50 51 51 55 50 48 51 54 56 53 52 55 55 53 56 48 56
   -&.(-&48) a. i. (8!:2) _9223372036854775808
51 57 50 50 51 51 55 50 48 51 54 56 53 52 55 55 53 56 48 56
   48{a.
0

The indices are inverted around that of '0', except the first one. I have no
idea why it should be doing anything arithmetic with the indices, though.

Marshall

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Sherlock, Ric
Sent: Sunday, November 07, 2010 1:02 AM
To: Programming forum
Subject: Re: [Jprogramming] Obscure bug in Format (8!:2)

> From: Ian Clark
> Sent: Sunday, 7 November 2010 15:17
> 
> Just thought I'd report this in j602 on the Mac ...
> 
>    (8!:2) _2147483648 NB. _2^31
> -./,),(-*,(
>    (8!:2) _2147483647
> -2.147483647e9
>    (8!:2) _2147483649
> -2.147483649e9
> 
> There's no analogous 32-bit problem with (":).

Confirmed in j602 and j701 on Win7 32-bit too.

   (8!:0) _2147483648   NB. _2^31
+-----------+
|-./,),(-*,(|
+-----------+
   (8!:1) _2147483648   NB. _2^31
+-----------+
|-./,),(-*,(|
+-----------+
   (8!:2) _2147483648   NB. _2^31
-./,),(-*,(
   
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to