php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47865 muliplication problem with 0.3
Submitted: 2009-04-01 16:36 UTC Modified: 2009-04-01 16:40 UTC
From: pelhamny at gmail dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.2.9 OS: i5/OS
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pelhamny at gmail dot com
New email:
PHP Version: OS:

 

 [2009-04-01 16:36 UTC] pelhamny at gmail dot com
Description:
------------
There appears to be a bug when multiplying by 0.3
I only tested this under i5/OS.

Reproduce code:
---------------
<?php
$tax = 90 * 0.3;
echo $tax;
?>

ALSO with same results:

<?php
$tax = (float)(90 * 0.3);
echo $tax;
?>


Expected result:
----------------
30

Actual result:
--------------
27

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-01 16:40 UTC] pajoye@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC