j=. _4 4 p:"0 n are the integers that need to be
considered.  If m (here m=.3) is the smallest prime
whose powers are in the running, then the highest
possible exponent is <.m^.{:j .  The problem is 
manageable.



----- Original Message -----
From: "Miller, Raul D" <[EMAIL PROTECTED]>
Date: Thursday, September 21, 2006 11:53 am
Subject: RE: [Jprogramming] Explicit to Tacit - newbie question

> Roger Hui wrote:
> > How about solving the problem for large integers?
> > If the argument is less than 2^31 a table-driven
> > approach should be most efficient (but much less
> > interesting).
> 
> I'm not sure how I would tackle this problem for
> a domain which is not a part of the domain of
> p:inv
> 
> I could probably use 1&p: to probe regions around
> the number in question -- I can imagine this working
> for many values up to around 2^62x 
> 
> That said, my npp does not work for numbers 
> within the domain of p:inv, and it would also
> be interesting (albeit, more complicated) to 
> include these numbers in its domain.
> 
>   npp 2^30
> |out of memory: npp
> |       npp 2^30
> 
> One simple approach would be to have a "closest
> match so far" (initially 1), and work through 
> the powers one row at a time.
> 
> Another approach would involve partitioning
> the primes such that implausible roots are
> ignored in the iterations.
> 
> That said, I don't have the time right now to
> pursue these implemtations.


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

Reply via email to