note 54579 added to function.fmod
| From: | sonicseaweed at gmail dot com | Date: | Fri, 08 Jul 2005 11:12:24 +0000 |
| Subject: | note 54579 added to function.fmod | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91667@lists.php.net to get a copy of this message | ||
I'm not so sure that fmod works correctly with negative numbers.
"The
mod function is defined as the amount by which a number exceeds the
largest integer multiple of the divisor that is not greater than that
number."
http://mathforum.org/library/drmath/view/52343.html
In the link page, the example is fmod(-340,60) should give 20 (positive) while fmod(340,60) should
give 40 (positive).
----
Manual Page -- http://www.php.net/manual/en/function.fmod.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54579
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54579&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54579&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54579&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54579&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54579&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54579&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54579&report=yes
Search -- http://master.php.net/manage/user-notes.php