#47901 [NEW]: Need to define "large numbers" in base_convert limitations
| From: | exploringbinary at gmail dot com | Date: | Sun, 05 Apr 2009 14:24:18 +0000 |
| Subject: | #47901 [NEW]: Need to define "large numbers" in base_convert limitations | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2082@lists.php.net to get a copy of this message | ||
From: exploringbinary at gmail dot com
Operating system: Windows
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Need to define "large numbers" in base_convert limitations
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 bug report at http://bugs.php.net/?id=47901&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47901&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47901&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47901&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47901&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47901&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47901&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47901&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47901&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47901&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47901&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47901&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47901&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47901&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47901&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47901&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47901&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47901&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47901&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47901&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47901&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47901&r=mysqlcfg