I can verify that your patch corrected the problem you reported on the WIN7_64
build I have been working with. Also, the test suite completed successfully
after the change.
On 3/26/2011 1:38, bill lam wrote:
> This patch seemed work,
>
> diff --git a/ap.c b/ap.c
> index 154642c..fc8c2fb 100644
> --- a/ap.c
> +++ b/ap.c
> @@ -365,7 +365,7 @@ static A jtmovsumavg1(J jt,I m,A w,A fs,B avg){A y,z;D
> d=(D)m;I c,p,s,t,wt;
> case 0: MOVSUMAVG(B,I,INT,I,INT,x, SETZ ); break;
> case 1: MOVSUMAVG(B,I,INT,D,FL, x/d,SETZD); break;
> case 2:
> - irange(AN(w),AV(w),&s,&t); t=0<t&&IMAX>=d*((D)s+(D)t);
> + irange(AN(w),AV(w),&s,&t);
> t=0<t&&(IMAX>=d*((D)s+(D)t))&&(IMIN<=d*((D)s+(D)t));
> if(t) MOVSUMAVG(I,I,INT,I,INT,x, SETZ )
> else MOVSUMAVG(I,D,FL, D,FL, x, SETZ ); break;
> case 3: MOVSUMAVG(I,D,FL, D,FL, x/d,SETZD); break;
>
> Птн, 25 Мар 2011, bill lam писал(а):
>> It seemed that +/\ special code cannot detect integer overflow on the
>> negative side,
>>
>> yy=: 3$>IF64{_2147483647;_9223372036854775807
>> plus=: +
>> 3 +/\ yy NB. special code
>> _9223372036854775805
>> 3 plus/\yy NB. without special code
>> _2.7670116e19
>> +/yy NB. expected result
>> _2.7670116e19
>>
>> --
>> regards,
>> ====================================================
>> GPG key 1024D/4434BAB3 2008-08-24
>> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm