Sorry, I meant 6 s: s:@:<@:(3!:1) and respectively M =: M. ( @:( 6 s: s:@:<@:(3!:1) ) )
-Dan -----Original Message----- From: Dan Bron [mailto:[email protected]] Sent: Monday, February 28, 2011 11:49 AM To: 'Programming forum' Cc: 'David Ward Lambert' Subject: RE: [Jprogramming] timing doesn't scale to large problem size. > The current implementation [of M.] retains > results only for arguments that are small > non-negative integer atoms. If it helps, any argument can be turned into a small non-negative integer with 6 s: s:@:(3!:1)@:< . If you want an M.-like adverb that applies this transformation first, M =: M. ( @:( 6 s: s:@:(3!:1)@:< ) ) But I imagine 3!:1 is pretty expensive, so you'd have to get a lot of improvement out of M. to make it worthwhile. -Dan ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
