|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-03 08:11 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 08:00:01 2025 UTC |
Description: ------------ $t is supposed to return 0. However, for some reason $x is not the same as $v. The problem only occurs with this number. Reproduce code: --------------- $x = (5.10 * 200); $v = 1020; $t = $x - $v; echo "x = ".$x ."<br>"; echo "v = ".$v ."<br>"; echo "t = ".$t ."<br>"; if($x==$v){ echo "yes"; } else { echo "no"; } Expected result: ---------------- x = 1020 v = 1020 t = 0 yes Actual result: -------------- x = 1020 v = 1020 t = -1.1368683772162E-13 no