牛逼的GMP数学运算库

搞了一晚上,搞定了一个需要使用无限长度数字运算的产品功能开发,实现权限模块的处理,使用了gmp库来完成,效果一级棒,性能好不好还不知道,不过好在不是用在高性能要求的部分,好久木有今晚这样的为了搞定一个问题而钻研的劲头了。

顺便记录一下,如果要在BSD系统下的PHP中使用GMP库,不要安装最新的5.0.x版本的GMP库,4.2.4以下的版本最好,要不编译不过去的!

当前功能中实际使用到的最大数字是 18446744073709107172 ,二进制的结果是如此惊人的长度: 1111111111111111111111111111111111111111111110010011011111100100

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
5 Responses
  1. walle says:

    其实64位的int就够你的应用了,gmp是一个数学库,类似的还有很多。

  2. 雨衣 says:

    学习一下,很久没看这些了

  3. 深圳丝印 says:

    虽然不懂,但觉很吊

  4. 福田家教 says:

    个人觉得学习数学 必须要有比较强的逻辑性

  5. Article ideas very clear . Your writing style is very unique. I very much appreciate the articles you write . Hope you continue to create the beautiful works .

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image