Re: Bug?

From: Date: Wed, 08 Aug 2001 09:06:13 +0000
Subject: Re: Bug?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61774@lists.php.net to get a copy of this message
you must use float not int :D ----- Original Message ----- From: "Maxim Maletsky" <maxim@japaninc.com> To: "'[Intent A/S] Tais M. Hansen'" <tmh@intent.dk>; <php-general@lists.php.net> Sent: Wednesday, August 08, 2001 7:01 PM Subject: RE: [PHP] Bug? > good point. > > ...and try this out: > > > echo (int)((8.85-8)*100).'<br>'; > echo ((8.85-8)*100).'<br>'; > > > Kinda weird, > can anyone explain? > > > Thanks, > Maxim Maletsky > > > > -----Original Message----- > From: [Intent A/S] Tais M. Hansen [mailto:tmh@intent.dk] > Sent: Wednesday, August 08, 2001 4:49 PM > To: php-general@lists.php.net > Subject: [PHP] Bug? > > > Hi! > > I just came across this weird thing. Bug? You tell me! > > print (int)((8.85-8)*100); > > I would think the line above would print "85". But for some reason, it > prints "84"?? Can anyone tell me why that is? > > -- > Intent A/S > Tais M. Hansen > Web Developer > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#61774) next »