summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stddev.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/stddev.cpp b/stddev.cpp
index 50d81f9..e3ce623 100644
--- a/stddev.cpp
+++ b/stddev.cpp
@@ -50,6 +50,8 @@ int main(int,char **argv){
const double s_count=data.size();
const double s_mean=total/data.size();
const double s_median=data[data.size()/2];
+ const double s_min=data[0];
+ const double s_max=data[data.size()-1];
total=0;
for(double v : data){
@@ -62,5 +64,6 @@ int main(int,char **argv){
<<"Mean: "<<s_mean<<'\n'
<<"Stddev: "<<s_stddev<<'\n'
<<"Stderr: "<<s_stderr<<'\n'
- <<"Median: "<<s_median<<endl;
+ <<"Median: "<<s_median<<'\n'
+ <<"Range: ["<<s_min<<","<<s_max<<"]"<<endl;
}