See my reply to Mike Day from a few minutes ago.
In particular,
   float + extended
is the same as
   float + x:^:_1 extended
i.e. the leftmost x: in
   x: float + x:^:_1 extended
does not buy you any extra precision.

http://www.jsoftware.com/help/dictionary/dictg.htm



----- Original Message -----
From: Raul Miller <[EMAIL PROTECTED]>
Date: Friday, September 28, 2007 12:04
Subject: Re: [Jprogramming] Performance of exact keyed aggregate
To: Programming forum <[email protected]>

> On 9/28/07, Roger Hui <[EMAIL PROTECTED]> wrote:
> >   (1000$0) x:@+//. 1000$2^50
> > 1125899906842623744
> >   (1000$0) +//. x: 1000$2^50
> > 1125899906842624000
> 
> I cannot think of any reason, other than special code, for
> this difference.  (And I think you will not get that first result
> with your j602 code base.)
> 
> Without special code, that first expression should be
> equivalent to
>    n=:2^50
>    n+x:n+x:n+x:n+...x:n+n
> 
> In other words, without special code, the first intermediate
> result would use floating point representation and every
> subsequent intermediate result would use arbitrary precision
> representation
> 
> And, with this value for n
>    (x:n+n) -: n+&x:n
> 1
> 
> That said, if special code prevents x:@+/ from functioning in
> this fashion, that might account for the speed difference.
> (but does not account for why x: was necessary).
> 
> In other words -- if you are correct (and I don't have any reason
> to suspect you are not), then there's mysterious things happening.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to