#23563 [Opn->Csd]: base_convert is broken

From: Date: Thu, 01 Apr 2004 09:51:10 +0000
Subject: #23563 [Opn->Csd]: base_convert is broken
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359878@lists.php.net to get a copy of this message
ID: 23563 Updated by: irchtml@php.net Reported By: jaakkoho at paju dot oulu dot fi -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Linux 2.4 (Debian) PHP Version: 4.3.1 Assigned To: hholzgra New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2003-09-10 21:15:23] hholzgra@php.net see also 23564 ------------------------------------------------------------------------ [2003-05-11 02:07:13] moriyoshi@php.net PHP attempts to convert the numeric string to a double value within base_convert() function. And during this conversion, some lower digits may be lost due to the precision of the double value, which depends on the platform. http://www.php.net/manual/en/language.types.float.php ------------------------------------------------------------------------ [2003-05-09 08:37:03] jaakkoho at paju dot oulu dot fi Converting a decimal to n-base and then back to decimal failed: print base_convert(base_convert("10000000000000001", 10, 36), 36, 10); output: 10000000000000000 (the last '0' should be '1') Bug appears only if strlen($value_to_convert) > 16. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23563&edit=1

« previous php.doc (#969359878) next »