doutan8775
doutan8775
2010-05-20 12:40

有没有办法最大化PHP_INT_MAX?

已采纳

I can't find this row in php.ini, so is there any way to do that?

So ok, I understood, the answer is not, then how should I calculate the result of this task if I want it do with php?

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143 ?
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • duanpacan2583 duanpacan2583 11年前

    You can increase PHP_INT_MAX. As others have said, PHP_INT_MAX is platform dependent. That means on 32 bit hardware or a 32 bit OS or a 32 bit compile of PHP, PHP stores the bit in 4 bytes (max of about 2 billion). However, if all 3 are 64 bit, the max goes to 8 bytes (about 9e18 or 9,000,000,000,000,000,000).

    So if you really want large ints, get a 64bit machine, and a 64bit OS, and a 64bit compile of PHP...

    点赞 评论 复制链接分享
  • douxu3315 douxu3315 11年前

    No.

    From http://www.php.net/manual/en/reserved.constants.php:

    These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.

    点赞 评论 复制链接分享
  • dongzuan4917 dongzuan4917 11年前

    Nope. It's hardware/os limitation, not PHP.
    You can use bcmath fructions for large numbers

    点赞 评论 复制链接分享
  • dtwr2012 dtwr2012 11年前

    You can not control it actually. However, if you are dealing with BIG numbers, I would suggest you the:

    BC Math extension.

    点赞 评论 复制链接分享

为你推荐