From 6146beb0f85b1d2b45054ce75b1a0aca4cdf011e Mon Sep 17 00:00:00 2001 From: neingeist Date: Fri, 14 Feb 2014 20:41:32 +0100 Subject: [PATCH] Calculate range --- av-variance.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/av-variance.c b/av-variance.c index 7a0b8f8..bc314aa 100644 --- a/av-variance.c +++ b/av-variance.c @@ -2,6 +2,7 @@ #include #include #include +#include double mean(double set[], int set_n) { double sum = 0.0; @@ -35,6 +36,30 @@ double sample_stddev(double set[], int set_n) { return sqrt(sample_variance(set, set_n)); } +double set_min(double set[], int set_n) { + double min = MAXDOUBLE; + + for(int i=0; i