Bo Jacoby wrote:
>  I wonder how to translate this explicit verb into a tacit verb?
>     E=. 4 : '(y+x*1&o.)^:_ y'      

How about:

           Et=:  ,~ (p. 1&o.)^:_ ]
        
           0.0167   (E-:E2) 0.46478
        1

The key insight is that  x f^:n y  is  x&f^:n y  .   That is, the 
right-argument to dyadic power is "carried through" all the
iterations (and we need the initial values of both x and y carried through all 
iterations, hence the  ,  ).   I guess a second,
minor insight is that  y+x*u  is just a polynomial evaluated at  u  , which 
allows us to use  p.  to avoid picking apart this fixed
argument (and the coefficient vector for  p.  is always "reversed", hence the  
~  on the  ,  ).

-Dan

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

Reply via email to