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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Tue Apr 23 22:01:31 2024 UTC