Dear Root users,
I try to define a Long64_t like:
Long64_t toto=4000000000; // 4e+09
cout << "toto= " << toto << endl;
but the display of this program gives me:
root [0] .X essai.cc
toto= -294967296
It looks like an overflow, doesnât it?
I canât understand this result, I thought a Long64_t variable could increase up to 2^63 (or 2^63 -1).
If I make something like:
Long64_t papa=0;
do
{
papa+=100000;
cout << papa << endl;
}
while (papa>=0);
then âpapaâ goes up more than 10^12 (I stopped the program before it ended). This proves that I can use Long64_t type well. So, why âtotoâ canât be 4e9?
If anyone has a comment or a response, thanks very much.
PS: Iâm working with root 4.02/00 on Mac OS 10.3.9.