The example works better if you use <....@%: instead of <@.%: . Thus:
n=: */ p: i. 40x N=: n^5 n - 5 <....@%: N 0 n - 5 <....@%: N+1 0 n - 5 <....@%: N-1 1 ----- Original Message ----- From: Raul Miller <[email protected]> Date: Monday, January 25, 2010 15:05 Subject: Re: [Jchat] x. and so on in wiki To: Chat forum <[email protected]> > On Mon, Jan 25, 2010 at 5:52 PM, Roger Hui <[email protected]> wrote: > > Do you mean like this? > > > > ] x=: !40x > > I would have thought so, but your post got me to experiment > and I think I found a problem case: > > n=:*/p:i.40x > N=:n^5 > n-5 <@.%: N > |domain error > NB. from http://www.jsoftware.com/jwiki/Phrases/Arith > introot=:4 : '(] [...@.(y&>:@^&x...@]) +)/ > 1x,|.*/\.2x#~x<....@%~2x<....@^.y' n-5 introot N > 0 > n-5 introot N+1 > 0 > n-5 introot N-1 > 1 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
