#47901 [Opn->Bgs]: Need to define "large numbers" in base_convert limitations
| From: | vrana@php.net | Date: | Thu, 19 Nov 2009 11:14:41 +0000 |
| Subject: | #47901 [Opn->Bgs]: Need to define "large numbers" in base_convert limitations | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3229@lists.php.net to get a copy of this message | ||
ID: 47901
Updated by: vrana@php.net
Reported By: exploringbinary at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Windows
PHP Version: Irrelevant
New Comment:
There's a link to Floating point numbers.
Previous Comments:
------------------------------------------------------------------------
[2009-04-05 14:24:17] exploringbinary at gmail dot com
Description:
------------
The documentation for base_convert says "base_convert() may lose
precision on large numbers...". Can you define exactly what "large
number" is? Without knowing the limit, it's hard to trust the results.
I know you can't specify a single limit, because it could vary by
implementation. It still would be useful to define a limit for the most
common implementations, like 32 bit unsigned integers or IEEE double
floating-point.
In the case of IEEE double floating-point, my guess is that the limit
is 2^53, meaning that all integers less than or equal to 2^53 will be
converted correctly. (All integers from 0 to 2^53 can fit in an IEEE
double.)
Related bug reports:
Bug #23564 base_convert() ignores last character
Bug #35874 base_convert is off on numbers greater than 13 decimal
places
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47901&edit=1