note 109221 deleted from language.types.float by googleguy

From: Date: Sat, 12 Jan 2013 11:06:27 +0000
Subject: note 109221 deleted from language.types.float by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192987@lists.php.net to get a copy of this message
Note Submitter: grycsys at gmail dot com ---- Comparing floats: <?php $f = 0.03; $b = (1 - 0.97); var_dump($f == $b); //result FALSE ?> <?php $f = (float)(string)0.03; $b = (float)(string)(1 - 0.97); var_dump($f == $b); //result TRUE ?>

« previous php.notes (#192987) next »