Re: base_convert() broken

From: Date: Sat, 11 Aug 2001 19:03:02 +0000
Subject: Re: base_convert() broken
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-62955@lists.php.net to get a copy of this message
SB>> Okay, but it now gives a wrong result (a negative running time of SB>> a song) along with the warning. Well, then the script has to be fixed to not put strings longer that fit the signed long into this function. That's why the warning is there. SB>> Could this be fixed in a way that restores the 'old' SB>> functionality, just 'righter'? I don't see any way to fit number more than LONG_MAX into long. It can be modified back so that it returns whatever is there, but the result will be bogus (well, it may seem right in your particular case but will be completely bogus in other cases). Only real way to fix it is to promote big numbers to floats, but it requires some work. Anybody who has time is welcome to do it, or I will look at it myself, but that would be in a couple of days, I guess. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

« previous php.dev (#62955) next »