|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11435 Floats are not handled correctly by printf?
Submitted: 2001-06-12 09:23 UTC Modified: 2001-06-12 13:23 UTC
From: tem at iocus dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.0 Latest CVS (2001-06-12) OS: Linux (Mandrake & Redhat)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tem at iocus dot com
New email:
PHP Version: OS:


 [2001-06-12 09:23 UTC] tem at iocus dot com
echo $amount . "\n";

Produces the following output:


My math is a little fuzzy but I think 2.03 * 100 = 203. This
used to work in php 3.x but seems to be broken since the 4.x


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-12 13:23 UTC]
The famous rounding issue.
By using 'f' (float) would give you correct result.
Not a bug.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 01:01:28 2024 UTC