--- oldmath.c 2009-11-01 15:21:19.000000000 -0500 +++ math.c 2009-11-01 15:23:53.000000000 -0500 @@ -61,6 +61,45 @@ } } +/* + * call-seq: + * Math.stdev(array) => double + * + * Computes the standard deviation of the elements in an array + * If they are all numbers. + * + * + */ + +static VALUE +math_stdev(VALUE obj, VALUE ary) +{ + long i; + double sum = 0.0; + double mean = 0.0; + double numer = 0.0; + + + for (i=0; i