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
 [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: Sat Apr 27 03:01:29 2024 UTC