Yes, sorry, I didn't read the thread, just your caveat about M.'s
limitations.

But the utility M might find some broader applicability.  Especially with a
few tweaks:

           integrate =:  6 s: s: @: < @: (3!:1)
           M =: memo =:  (&: (integrate inv) ) M. (&: integrate )
           

           # smoutput powwow&.>  ;: 'we have I say we have a winner'
        we
        have
        I
        say
        a
        winner
        8
           

Note that all 8 results were produced, but smoutput was only called 6 times
(and got it the literal inputs you'd want/expect).
           
-Dan

-----Original Message-----
From: Raul Miller [mailto:[email protected]] 
Sent: Monday, February 28, 2011 12:34 PM
To: Programming forum
Cc: Dan Bron; David Ward Lambert
Subject: Re: [Jprogramming] timing doesn't scale to large problem size.

On Mon, Feb 28, 2011 at 11:48 AM, Dan Bron <[email protected]> wrote:
> If it helps, any argument can be turned into a small non-negative integer
> with  6 s: s:@:(3!:1)@:< .

With fibn, you already have a small argument (the value for n), but
after a certain point you run out of small values.

-- 
Raul

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

Reply via email to