#26643 [Opn->Bgs]: numeric converted to float
| From: | helly@php.net | Date: | Wed, 17 Dec 2003 09:21:14 +0000 |
| Subject: | #26643 [Opn->Bgs]: numeric converted to float | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52201@lists.php.net to get a copy of this message | ||
ID: 26643
Updated by: helly@php.net
Reported By: michael dot frank at bmg dot com
-Status: Open
+Status: Bogus
Bug Type: Sybase-ct (ctlib) related
Operating System: RedHat Linux
PHP Version: 4.3.4
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.
Thank you for your interest in PHP.
The two numbers 1150000000002401 and 1.1500000000024E+15 are the exact
same number on your machine.
Previous Comments:
------------------------------------------------------------------------
[2003-12-17 03:27:19] michael dot frank at bmg dot com
Description:
------------
When I try to fetch a numeric (18,0) value in php 4.2.3 I get correct
values. After upgrade to php 4.3.4 I get converted numbers.
On the older Version i Recieved e.g.:
1150000000002401
on the new version i get this:
1.1500000000024E+15
It seems like a old php bug - but i have the newest PHP Version running
Sybase is ASE 12.5 on RedhatLinux. Apache is 1.3.29
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26643&edit=1