Thank you for responding. 

I believe that   f...@g t.i.n   must be equal to
  (f t.i.n)&p.@(g t.i.n)&p.  t.i.n  
for all nonnegative integer values of  n . High order terms in  f  or  g  do 
not induce low order terms in  f...@g   

But I don't think that computing the noun  f...@g t.i.n  for a big  n  is 
efficient for implementing the verb  f...@g t.  The evaluation of 
   (1&o.t.n)&p.^:2 t.n=.i.24
was slow, but I was impressed that it did work after all!

--- Den man 10/5/10 skrev Roger Hui <[email protected]>:

> Fra: Roger Hui <[email protected]>
> Emne: Re: [Jprogramming] Taylor expansion of sin(sin(x))
> Til: "Programming forum" <[email protected]>
> Dato: mandag 10. maj 2010 02.40
> 1&o.^:2 t. signals domain error
> because
> u t. does a table look-up and 1&o.^:2 is not
> in the table.
> 
> Are you claiming that if f t. and g t. both
> work then f...@g t. should work?
> 
> 
> 
> ----- Original Message -----
> From: Bo Jacoby <[email protected]>
> Date: Sunday, May 9, 2010 3:45
> Subject: [Jprogramming]  Taylor expansion of sin(sin(x))
> To: Programming forum <[email protected]>
> 
> >    1&o.t.i.10 NB. The sine function is taylor 
> > expanded   
> > 0 1 0 _0.166667 0 0.00833333 0 _0.000198413 0
> 2.75573e_6
> >    1&o.t.i.10x NB. exactly 
> > 0 1 0 _1r6 0 1r120 0 _1r5040 0 1r362880
> >    1&o.^:2 t.i.10x NB. Why does sin sin x
> produces an 
> > error message?
> > |domain error
> > |       1&o.^:2 t.i.10
> >   (1&o.t.i.10)&p.^:2 t.i.10 NB. this trick
> works around the bug
> > 0 1 0 _1r3 0 1r10 0 _8r315 0 13r2520
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



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

Reply via email to