17 void mnbins(
double a1,
double a2,
int naa,
double& bl,
double& bh,
int& nb,
double& bwid) {
29 double awid,ah, al, sigfig, sigrnd, alb;
30 int kwid, lwid, na=0, log_;
32 al = a1 < a2 ? a1 : a2;
35 ah = a1 > a2 ? a1 : a2;
36 if (al == ah) ah = al + 1;
39 if (naa == -1)
goto L150;
46 awid = (ah-al) /
double(na);
47 log_ = int(
log10(awid));
48 if (awid <= 1) --log_;
49 sigfig = awid*
pow(10.0, -log_);
51 if (sigfig > 2)
goto L40;
55 if (sigfig > 2.5)
goto L50;
59 if (sigfig > 5)
goto L60;
66 bwid = sigrnd*
pow(10.0, log_);
70 if (bwid <= 0)
goto L10;
75 bl = bwid*double(lwid);
79 bh = bwid*double(kwid);
81 if (naa > 5)
goto L240;
82 if (naa == -1)
return;
84 if (naa > 1 || nb == 1)
return;
89 if (nb << 1 != naa)
return;
Namespace for new ROOT classes and functions.
void mnbins(double a1, double a2, int naa, double &bl, double &bh, int &nb, double &bwid)
double pow(double, double)