On 3/7/08, Xu Zuoqian <[EMAIL PROTECTED]> wrote:
> EMA=:((2 % [:>: #) $: ]) : (4 :'(((x * [) + (-.x) * ])/\.)&.|. y')
> Can it be convert to a tacit train?
Yes.
But I think your explicit version should be significantly
more efficient for long arguments:
ema=: +/ .* (((1 {.~ #) >. K * <:/~) * (1 - K) ^ [: - -/~)@[EMAIL PROTECTED]
(EMA -: ema) p:i.10
1
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm