|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4449 Mod computation error!
Submitted: 2000-05-15 04:48 UTC Modified: 2001-02-10 16:03 UTC
From: ukustar at kimo dot com dot tw Assigned:
Status: Closed Package: Other
PHP Version: 3.0.16 OS: FreeBSD
Private report: No CVE-ID: None
 [2000-05-15 04:48 UTC] ukustar at kimo dot com dot tw
echo ($a*100)%10;
//output is "0", but it should be "1"
echo ($a*100)%10;
//output is "2", this is correct!
//I found most float variable are correct, 
//but few are incorrect.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-10 16:03 UTC]
rounding errors happen when doing floating point math, depending on your system.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 19:03:41 2023 UTC