X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdescript.c;h=0492b33ed2378a232418f368326974eab88eaf00;hb=2133a4941da5c903fe08c0961959e89b7d5f7321;hp=3aafb94e611c2cb6d44af8e1ab99269ea769cdb5;hpb=2cc5c881d3bf3effeb07bc9e3aef958975a17b27;p=pspp diff --git a/src/descript.c b/src/descript.c index 3aafb94e61..0492b33ed2 100644 --- a/src/descript.c +++ b/src/descript.c @@ -742,8 +742,14 @@ calc_descriptives (const struct casefile *cf, void *dsc_) continue; } - if (dv->moments != NULL) - moments_pass_one (dv->moments, x, weight); + if (dv->moments != NULL) + { + if (dsc->max_moment > MOMENT_MEAN) + moments_pass_one (dv->moments, x, weight); + else + moments_pass_two (dv->moments, x, weight); + } + if (x < dv->min) dv->min = x; if (x > dv->max)