|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-24 12:53 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ The erro is: 1.3+0.1>1.4 Reproduce code: --------------- $y=1.3+0.1; if($y==1.4){$y-=1.4; echo "yes y-1.4=$y";} else{$y-=1.4; echo "no y-1.4=$y";} Expected result: ---------------- The result of the code should be: yes y-1.4=0 Actual result: -------------- Actual result is: no y-1.4=2.2e-12 It happens only when $y=1.3+0.1; If changing the code to $y=1.2+0.2; then the result is correct. What is going on here?