summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-09-23 13:43:37 +0200
committerTom Smeding <tom.smeding@gmail.com>2019-09-23 13:43:37 +0200
commit15d140092bff4ce56caee1f7f50ef588e226fec4 (patch)
tree2c98c50ade62f188414658933f09b4f1766f7630
parente34bdab2d6725543be5a040bd1bdaeebd675f96b (diff)
Print range of inputHEADmaster
-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;
}