RE: [ROOT] CINT bug with large unsigned int ?

From: Axel Naumann (a.naumann@worldnet.att.net)
Date: Sat Feb 24 2001 - 20:03:39 MET


Hi,

root [17] UInt_t nb=4294967280
root [18] nb=nb/2
(unsigned int)4294967288

Int_t(4294967280)==-16, Int_t(4294967288)==-8, so CInt does a 
nb = UInt_t( Int_t(nb) /2 )...

Cheers, Axel.

> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Patois Yannick
> Sent: Saturday, February 24, 2001 11:38 AM
> To: ROOT mailing list
> Subject: [ROOT] CINT bug with large unsigned int ?
> 
> 
> Hi,
> 
> On my version of root (3.00.05, linux ix86, Mdk6.x) :
> 
> root [38] UInt_t nb=-1;
> root [39] cout <<nb<<endl;
> 4294967295
> root [40] UInt_t nb2=nb/2;
> root [41] cout <<nb2<<endl;
> 0
> 
> It seems that some operations (here, a divisions) are not very well made
> by CINT when the value is too large (over 2^31).
> 
> I didnt found any related point in the CINT limitations page.
> 
> 	Yannick
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET