Strange bug?

Jayoung Wu (jayoung@ipst.umd.edu)
Thu, 26 Mar 1998 10:37:05 -0500 (EST)


Hi,
I got a strange error message:
*** Break *** floating point exception

The following is part of my code which looks perfect to me.
----------------------------------------------------------------

...

// *********************************************************************
// 3. BGO fit
// *********************************************************************
// calculate each layer incident position

Float_t ebgo[10][40];
// values for ebgo[10][40] are assigned ...
Float_t bsum[10]={0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
Float_t bmax;
Float_t ebxs = 0.;
Int_t jbmax, i, j;

for (i=0; i<1; i++) {

// Find max crystal at each layer
bmax = ebgo[i][0];
jbmax = 0;
for (j=1; j<40; j++) {
bsum[i] += ebgo[i][j];
if (ebgo[i][j] > bmax) {
bmax = ebgo[i][j];
jbmax = j;
}
}
printf("bmax[%d][%d]=%g\n",i+1,jbmax+1,bmax);

// Calculate incident position at each layer
for (j=0; j<40; j++)
if (ebgo[i][j] > 0.1*bmax)
ebxs += ebgo[i][j] * bgox[j];
}
--------------------------------------------------------------
When I execute the macro, it prints out "bmax[1][10]=0.13472".
Then it gives me err message: *** Break *** floating point exception
It means up to "print" statement it works.
Is there something wrong with my code after "print" statement?
My version is root_v0.9.OSF1.V3.2.tar. Is it due to old version ?

---
Thanks in advance!
Jayoung