Re: Puzzled by IntegerPart
- To: mathgroup at smc.vnet.net
- Subject: [mg114598] Re: Puzzled by IntegerPart
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Fri, 10 Dec 2010 02:27:48 -0500 (EST)
- References: <idqcsa$ivb$1@smc.vnet.net>
- Reply-to: nma at 12000.org
On 12/9/2010 3:00 AM, Themis Matsoukas wrote: > IntegerPart[100*1.15] > > 114 > > ??? > > Themis > From help, it says "in effect takes all digits to the left of the decimal point and drops the others." Since 100*1.15 = 114.99999999999999 Then all digits to the left of the decimal point is 114 If you had instead wrote IntegerPart[100*115/100] then you would have obtained 115, but you'r working with floating points numbers. --Nasser