note 118387 added to internals2.opcodes.mod

From: Date: Fri, 27 Nov 2015 05:18:32 +0000
Subject: note 118387 added to internals2.opcodes.mod
Groups: php.notes 
Request: Send a blank email to php-notes+get-204234@lists.php.net to get a copy of this message
I came across strange mod operation results can anyone explain the behavior Sorry, if breaking any forum rules. <?php $amount=19.90; $mul=0.10; $ztmpamt=$amount*100; $zbidmul=$mul*100; echo "amount:".$ztmpamt." mul:".$zbidmul; echo "<br>"; $zcheckmultiple= $ztmpamt % $zbidmul; echo "Why this is not zero:".$zcheckmultiple; echo "<br>"; echo "amt:".$ztmpamt.":mul:".$zbidmul; echo "<br>"; $result= 1990 % 10; echo "This is zero:".$result; echo "<br>"; ?> ---- Server IP: 72.52.91.14 Probable Submitter: 59.163.170.11 ---- Manual Page -- http://php.net/manual/en/internals2.opcodes.mod.php Edit -- https://master.php.net/note/edit/118387 Del: integrated -- https://master.php.net/note/delete/118387/integrated Del: useless -- https://master.php.net/note/delete/118387/useless Del: bad code -- https://master.php.net/note/delete/118387/bad+code Del: spam -- https://master.php.net/note/delete/118387/spam Del: non-english -- https://master.php.net/note/delete/118387/non-english Del: in docs -- https://master.php.net/note/delete/118387/in+docs Del: other reasons-- https://master.php.net/note/delete/118387 Reject -- https://master.php.net/note/reject/118387 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204234) next »