note 98702 deleted from language.types.float by danbrown

From: Date: Thu, 01 Jul 2010 18:40:39 +0000
Subject: note 98702 deleted from language.types.float by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170633@lists.php.net to get a copy of this message
Note Submitter: antolene ---- <? $x = 24 * 1.1; $y = 26.4; var_dump($x == $y, $x > $y); the output will be: bool(false) // expected true since 24 * 11 = 26.4 bool(true) // expected is false I'm using the following as a workaround: $x = floatval((string)(24 * 1.1)); $y = 26.4; var_dump($x == $y, $x > $y);

« previous php.notes (#170633) next »