|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30462 round() error
Submitted: 2004-10-17 04:14 UTC Modified: 2005-09-22 21:38 UTC
From: haafiz at ezwebsolutions dot ca Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.3.8 OS: Linux
Private report: No CVE-ID: None
 [2004-10-17 04:14 UTC] haafiz at ezwebsolutions dot ca
two variable, $x[$g] and $y[$g]...

serialize($x[$g]) returns:  i:34;
serialize($y[$g]) returns:  i:43;

serialize(round($x[$g]/$y[$g], 5)) returns: d:0.7907000000000000028421709430404007434844970703125;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-17 20:29 UTC] haafiz at ezwebsolutions dot ca

$g = 0;
$x[$g] = 34;
$y[$g] = 43;

echo serialize(round($x[$g]/$y[$g], 5));


 [2004-10-18 23:53 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

check the serialize precision option.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 18:01:29 2024 UTC