Mike, Thank you for your kind reminder,there is a true numeric instability in the */\.
(0.1&EMA ,&(>./) 0.1&EMA2) i.6654 6644 6644 (0.1&EMA ,&(>./) 0.1&EMA2) i.6655 6645 _ So we must use it with caution when applying to stock market indexes. ps,just try a c version,and the timing is 0.023s. 2008/3/11, Mike Powell <[EMAIL PROTECTED]>: > Xu, > > You need to be a little careful if you use the EMA2 algorithm in > production situations. There is the ever present problem of machine > precision. For example: > > (0.1&EMA -: 0.1&EMA2) i.100 > 1 > (0.1&EMA -: 0.1&EMA2) i.1000 > 1 > (0.1&EMA -: 0.1&EMA2) i.10000 > 0 > > Usually, where economists and forecasters dwell, they are looking at > 20 years and precision is not usually an issue. Mais, guardez. > > > Mike Powell > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
