#include #include #include #include #include #include #include using namespace std; const char *argv0; void usage(){ cerr<<"Usage: "< ] []"< values; while(true){ double v; cin>>v; if(!cin)break; values.push_back(v); if(vmaxval)maxval=v; } if(!havebounds){ low=minval; high=maxval; } sort(values.begin(),values.end()); vector histogram(nbins); int binidx=0,tally=0,maxtally=-1; for(double v : values){ if(vhigh){ // cerr<<"Point "<=0&&binmaxtally)maxtally=tally; binidx=bin; tally=0; } tally++; } histogram[binidx]=tally; if(tally>maxtally)maxtally=tally; if(maxtally==0){ cerr<<"histogram: No data in range"<