|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
These functions allow you to work with arbitrary-length integers using the GNU MP library. In order to have these functions available, you must compile PHP with GMP support by using the --with-gmp option. 通过 GUN MP 库,这些函数答应你使用任意长度的整数。你需要编译 php 时使用 --with-gmp 参数 You can download the GMP library from http://www.swox.com/gmp/. This site also has the GMP manual available. You will need GMP version 2 or better to use these functions. Some functions may require more recent version of the GMP library. These functions have been added in PHP 4.0.4. Note: Most GMP functions accept GMP number arguments, defined as resource below. However, most of these functions will also accept numeric and string arguments, given that it is possible to convert the latter to a number. Also, if there is a faster function that can operate on integer arguments, it would be used instead of the slower function when the supplied arguments are integers. This is done transparently, so the bottom line is that you can use integers in every function that expects GMP number. See also the gmp_init() function. Example 1. Factorial function using GMP <?php print gmp_strval (fact (1000)) . "n"; This will calculate factiorial of 1000 (pretty big number) very fast. 返回类别: 教程 上一教程: PEAR:常用模块 下一教程: 在WAP站点用GD(1.8版以上)生成WBMP 您可以阅读与"PHP4.04 增加了对无限精度运算的支持"相关的教程: · PHP4.03的新功能 - 增加了对 Ovrimos SQL 的支持(转载)虽然PHP里对数据库的支持是越来越多。可是我还... · PHP4.04 新增加了专用的字符函数 Ctype · PHP 增加了对 .ZIP 文件的读取功能 · 一个简朴的图形计数器,需要MYSQL,GD的支持,LINUX下PHP4RC1通过 · 为php4加入动态flash文件的生成的支持 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |