Re: Can this code go faster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, April 26, 2005 9:56 am, René Fournier said:
> I've looked in the docs and don't see anything for this per se...
> I need to convert a binary number of arbitrary length to a signed
> integer.

No matter what you do, a PHP integer is going to be 32-bit.

So "artbitrary length" is not gonna happen...

Unless you use something like BC_MATH and specify your precision.

Also look into the user-contributed notes on the http://php.net/bindec
page, as many seem to be trying to do the same thing as you are.

http://php.net/base_convert also had pointers about using GMP which may
hold a solution.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux