#23563 [Opn]: base_convert is broken

From: Date: Sun, 11 May 2003 07:07:13 +0000
Subject: #23563 [Opn]: base_convert is broken
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969353336@lists.php.net to get a copy of this message
ID: 23563 Updated by: moriyoshi@php.net Reported By: jaakkoho at paju dot oulu dot fi Status: Open -Bug Type: Math related +Bug Type: Documentation problem Operating System: Linux 2.4 (Debian) PHP Version: 4.3.1 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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 (#969353336) next »