^Tum
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:mono-list- > [EMAIL PROTECTED] On Behalf Of Rohit > Sent: Tuesday, 26 August 2003 10:06 p.m. > To: Thong (Tum) Nguyen; 'Maurizio Colucci'; [EMAIL PROTECTED] > Subject: RE: [Mono-list] bug found! :-) > > please see inline... > > --- "Thong (Tum) Nguyen" <[EMAIL PROTECTED]> wrote: > > Hmm..that's not the reason. > > > > 4/3 isn't an integer if you're doing floating point > > arithmetic but > > that's not what's happening here. Notice how the > > following compiles > > without an error: > > > > int u = 3; > > int I = 4; > > int o = i / u; > > > > The reason there is an error in Maurizio's code is > > because dividing an > > integer by an unsigned integer yields a long > > (otherwise precision would > > be lost). The resulting long can't be assigned to > > the integer "o" > > without a cast. > > that is exactly what I mean when I said 4/3 != integer > (i did mean 3 is of uint type as was asked and as > gaurav too correctly and clearly pointed out). You said: 4/3 = 1.3333333333333333333333333333333 != integer. The excessive amount of "3"s made me think you thought 4/3 = 1.333333333F rather than 4/3 = 1L = long != integer. That's an important distinction. ^Tum --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.298 / Virus Database: 161 - Release Date: 13/11/2001 _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
