# generate statistics on an array.
#
macro stats m.x
  "simple statistics for an array"
  mean     = vsum($1)/npts($1)
  variance = vsum($1*$1)/npts($1)  - mean*mean
  std_dev  = sqrt(variance)
  print ' stats for $1 :'
  print ' mean +/- std_dev = ', mean, ' +/-', std_dev
end macro
