Jump to content


Photo

Very large Numbers


  • Please log in to reply
1 reply to this topic

#1 Sreti

Sreti
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 25 March 2006 - 08:26 PM

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.


#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 25 March 2006 - 10:01 PM

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]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users