ID:               46564
 Comment by:       support at coolpage dot com
 Reported By:      shelby at coolpage dot com
 Status:           Open
 Bug Type:         BC math related
 Operating System: BSD
 PHP Version:      5.2.6
 New Comment:

Here is function that works correctly:

function bcmod( $op, $mod, $scale )
{
   while( ($t = bcsub( $op, $mod, $scale )) > 0 ) $op = $t;
   return $op;
}


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

[2008-11-13 12:46:51] shelby at coolpage dot com

Description:
------------
bcmod( '1071', '357.5' ) returns '0'

Reproduce code:
---------------
echo bcmod( '1071', '357.5' );

Expected result:
----------------
bcmod( '1071', '357.5' ) should return '356'



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


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

Reply via email to