ID:               43981
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ikr at xiag dot ch
-Status:           Open
+Status:           Closed
 Bug Type:         Math related
 Operating System: Linux 2.6.22.13-0.3-default SMP
 PHP Version:      5.2.5
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-01-30 07:07:22] ikr at xiag dot ch

Description:
------------
PHP manual at http://ch2.php.net/manual/en/function.gmp-div-r.php
claims 
for gmp_div_r:

-----
resource gmp_div_r ( resource $n , resource $d [, int $round ] )
Calculates remainder of the integer division of n by d . The remainder

has the sign of the n argument, if not zero.
-----

However,

print(gmp_strval(gmp_div_r(-5, 100)) . "\n");

Will result in "5", not "-5".

Reproduce code:
---------------
<?php

print(gmp_strval(gmp_div_r(-5, 100)) . "\n");

?>

Expected result:
----------------
-5

Actual result:
--------------
5


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43981&edit=1

Reply via email to