#47901 [Bgs]: Need to define "large numbers" in base_convert limitations
ID: 47901
User updated by: exploringbinary at gmail dot com
Reported By: exploringbinary at gmail dot com
Status: Bogus
Bug Type: Documentation problem
Operating System: Windows
PHP Version: Irrelevant
New Comment:
Yes, I know there's a link. My bug report quotes text from the
paragraph that contains it. There is nothing within that link, that I
can see, that addresses my concern. If you see something there, please
be specific.
Previous Comments:
------------------------------------------------------------------------
[2009-11-19 11:14:41] vrana@php.net
There's a link to Floating point numbers.
------------------------------------------------------------------------
[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
Thread (4 messages)