|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-23 14:44 UTC] derick@php.net
[2003-11-23 14:59 UTC] JaiKMw at aol dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 02:00:01 2025 UTC |
Description: ------------ /* I would like to know if this is a bug, cuz i konw of some issues of defective processors like my pentium II processor I don't think that, cuz in the calculator of WinME the Answer is Right (23+23/2=23) This also happens with JavaScript... :-| :D Reproduce code: --------------- <?php function Mm($a,$b){ $R=$a+$b*0.5;// Is The Same If I Put " /2 " Instead. return $R; } echo Mm(23,23)."<BR>";//The Correct Would Be 23 Instead of 34.5 echo Mm(243,456)."<BR>";//'''''''''''''''''' 349.5 Instead of 471. ?> Expected result: ---------------- To write the Correct Answers.. Actual result: -------------- Doesn't givethe right Answer, and, it seems so stupid :D.. with all the respect :P, cuz 23+23=46, but, javascript do the same too, is an error on my processor or not?, the calc.exe shows the right answer.. :D... That bugs are from year 2000 xD.. :D