#36356 [Bgs]: After form submit system changing value other then entered
| From: | derick@php.net | Date: | Fri, 10 Feb 2006 15:40:36 +0000 |
| Subject: | #36356 [Bgs]: After form submit system changing value other then entered | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93125@lists.php.net to get a copy of this message | ||
ID: 36356
Updated by: derick@php.net
Reported By: Vlad at valuead dot com
Status: Bogus
Bug Type: *Math Functions
Operating System: Gentoo
PHP Version: 4.4.2
New Comment:
Floating point values have a limited precision. Hence a value might
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly
printing it without any mathematical operations.
If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2006-02-10 16:39:10] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2006-02-10 16:34:28] Vlad at valuead dot com
Description:
------------
Form submitting a dollar value $2.30 saved in MYSQL as $2.29, any other
value is fine like 2.40
4 people looked it it - nothing out of ordinary
Reproduce code:
---------------
http://www.valuead.com/utils/bug.txt
For whatever reason intval(230.0) returns 229
field CPM Cost http://www.valuead.com/utils/bug.txt
if nessesary would be happy to provide access to demo system
Expected result:
----------------
system should of store 2.30 in the database insted of 2.29
Actual result:
--------------
$2.99 in database after form submission insted of 2.30
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36356&edit=1