Bug #12623 Updated: mod operator
| From: | jmcastagnetto@php.net | Date: | Tue, 07 Aug 2001 18:22:14 +0000 |
| Subject: | Bug #12623 Updated: mod operator | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62477@lists.php.net to get a copy of this message | ||
ID: 12623
Updated by: jmcastagnetto
Reported By: dosena@altavista.com
Old Status: Closed
Status: Bogus
Bug Type: Math related
Operating System: linux (suse)
PHP Version: 4.0.4pl1
Previous Comments:
------------------------------------------------------------------------
[2001-08-07 11:14:21] dosena@altavista.com
Modulus (%) operator
i am not sure if the behavior for non-integer operands is defined, so i am not sure how important
this actually is
check
2035 % 179 = 66 // correct!
203.5 % 17.9 = 16 // incorrect - should be 6.6!
<?php
echo "2035 % 179 == " . 2035 % 179;
echo "<br>\n";
echo "203.5 % 17.9 == " . 203.5 % 17.9;
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12623&edit=1