Edit report at https://bugs.php.net/bug.php?id=46564&edit=1
ID: 46564 Comment by: shelby at coolpage dot com Reported by: shelby at coolpage dot com Summary: bcmod( '1071', '357.5' ) returns '0' Status: Bogus Type: Bug Package: BC math related Operating System: * PHP Version: 5.*, 6CVS (2009-04-01) Block user comment: N Private report: N New Comment: Is it your position that the bug is in a 3rd party library that PHP uses for the BC math API? If yes, is it your position that marking a bug as bogus, is okay even while the API performs erroneous to the documentation? Thanks for providing yet another evidence that bug reporting is a waste of time. Previous Comments: ------------------------------------------------------------------------ [2011-11-16 13:23:21] [email protected] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Not a PHP bug. ------------------------------------------------------------------------ [2008-11-13 13:20:43] shelby at coolpage dot com Correction, need ">= 0": function bcmod( $op, $mod, $scale ) { while( ($t = bcsub( $op, $mod, $scale )) >= 0 ) $op = $t; return $op; } ------------------------------------------------------------------------ [2008-11-13 13:03:27] support at coolpage dot com Here is function that works correctly: function bcmod( $op, $mod, $scale ) { while( ($t = bcsub( $op, $mod, $scale )) > 0 ) $op = $t; return $op; } ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=46564&edit=1
