xsa(src,len,wei) => sumf = 0.0 ma = 0.0 out = 0.0 sumf := nz(sumf[1]) - nz(src[len]) + src ma := na(src[len]) ? na : sumf/len out := na(