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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.