From ba772405e70745de6328eef0ef9a848dc442c14a Mon Sep 17 00:00:00 2001 From: Friedhelm Betz Date: Mon, 6 May 2002 10:56:21 +0000 Subject: [PATCH] new structure and constants extra git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@81330 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/gmp/constants.xml | 62 ++++++++++++++++ reference/gmp/reference.xml | 140 +++++++++++++++++++++++------------- 2 files changed, 151 insertions(+), 51 deletions(-) create mode 100644 reference/gmp/constants.xml diff --git a/reference/gmp/constants.xml b/reference/gmp/constants.xml new file mode 100644 index 0000000000..3efc52b3f6 --- /dev/null +++ b/reference/gmp/constants.xml @@ -0,0 +1,62 @@ + + +
+ &reftitle.constants; + &extension.constants; + + + + GMP_ROUND_ZERO + (integer) + + + + + + + + + + GMP_ROUND_PLUSINF + (integer) + + + + + + + + + + GMP_ROUND_MINUSINF + (integer) + + + + + + + + +
+ + diff --git a/reference/gmp/reference.xml b/reference/gmp/reference.xml index 9afc1a9389..5fa56ea924 100644 --- a/reference/gmp/reference.xml +++ b/reference/gmp/reference.xml @@ -1,56 +1,83 @@ - + GMP functions GMP - - 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 option. - - - You can download the GMP library from &url.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. - - - - 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. - - - +
+ &reftitle.intro; - If you want to explicitly specify a large integer, - specify it as a string. If you don't do that, PHP will - interpret the integer-literal first, possibly resulting - in loss of precision, even before GMP - comes into play. + These functions allow you to work with arbitrary-length integers + using the GNU MP library. - - - - - Factorial function using GMP - + + These functions have been added in PHP 4.0.4. + + + + 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. + + + + + If you want to explicitly specify a large integer, + specify it as a string. If you don't do that, PHP will + interpret the integer-literal first, possibly resulting + in loss of precision, even before GMP + comes into play. + + +
+ +
+ &reftitle.required; + + You can download the GMP library from &url.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. + +
+ +
+ &reftitle.install; + + In order to have these functions available, you must compile PHP with + GMP support by using the option. + +
+ +
+ &reftitle.runtime; + &no.config; +
+ +
+ &reftitle.resources; + &no.resource; +
+ + &reference.gmp.constants; + +
+ &reftitle.examples; + + + Factorial function using GMP + ]]> - + - - - This will calculate factorial of 1000 (pretty big number) - very fast. - + + + This will calculate factorial of 1000 (pretty big number) + very fast. + +
+ +
+ &reftitle.seealso; + + More mathmatical functions can be found in the sections + BCMath Arbitrary Precision Mathematics Functions + and Mathematical Functions. + +
+
&reference.gmp.functions;