Jump to content

Very large Numbers


Sreti

Recommended Posts

It seems I've run into quite a problem with the PHP data types. I am doing bitwise shifting and am exceeding the maximum integer size.

for example
$test = (1 << 32); //$test = 64? Should be 4294967296. It clearly exceeded maxint

Even if I had some way to make it unsigned, I still need to push up to around 40 places so I need something that works like a ULONG. Any help would be massively appreciated.
Link to comment
https://forums.phpfreaks.com/topic/5803-very-large-numbers/
Share on other sites

Maybe these could help:

[a href=\"http://us2.php.net/manual/en/ref.bc.php\" target=\"_blank\"]http://us2.php.net/manual/en/ref.bc.php[/a]

[a href=\"http://pear.php.net/reference/Math_Integer-latest/Math_Integer/_Math_Integer-0.8_Integer_php.html\" target=\"_blank\"]http://pear.php.net/reference/Math_Integer...nteger_php.html[/a]
Link to comment
https://forums.phpfreaks.com/topic/5803-very-large-numbers/#findComment-20698
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.