#42487 [Opn->Bgs]: php.ini setting for "precision" ignored. value is always 6
| From: | jani@php.net | Date: | Thu, 30 Aug 2007 13:19:19 +0000 |
| Subject: | #42487 [Opn->Bgs]: php.ini setting for "precision" ignored. value is always 6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116888@lists.php.net to get a copy of this message | ||
ID: 42487
Updated by: jani@php.net
Reported By: gerhard dot mueller at travian dot org
-Status: Open
+Status: Bogus
Bug Type: Math related
Operating System: Linux Debian
PHP Version: 5.2.3
New Comment:
Precision has nothing to do with this.
Previous Comments:
------------------------------------------------------------------------
[2007-08-30 13:17:18] gerhard dot mueller at travian dot org
Description:
------------
The php.ini setting of "precision" seems to be ignored and is always 6.
I makes no difference when you override it with ini_set() or directly in
php.ini.
tested on 5.1.6, 5.2.2 and 5.2.3 on several Linux Servers and 2 Windows
PCs. Only in 5.1.6 change of "precision" was not ignored.
Example in php.ini
; The number of significant digits displayed in floating point
numbers.
precision = 12
Same as this report but bug has nothing to do with round()
http://bugs.php.net/bug.php?id=42484
Reproduce code:
---------------
ini_set('precision','6');
$big_int = (float)1200000;
print "precision6: $big_int \n\n";
ini_set('precision','12');
$big_int = (float)1200000;
print "precision12: $big_int";
Expected result:
----------------
precision6: 1.2E+006
precision12: 1200000
Actual result:
--------------
precision6: 1.2E+006
precision12: 1.2E+006
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42487&edit=1