From 870331f5f341b1ef6013b814933e208a990fdd8a Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Tue, 2 Jan 2001 20:03:23 +0000 Subject: [PATCH] Some minor tweaks git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@38453 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/gmp.xml | 32 ++++++++++++++++---------------- language/types.xml | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/functions/gmp.xml b/functions/gmp.xml index c173f3ebcc..643173f106 100644 --- a/functions/gmp.xml +++ b/functions/gmp.xml @@ -4,7 +4,7 @@ These functions allow you to work with arbitrary-length integers - using GNU MP library. In order to have these + using the GNU MP library. In order to have these functions available, you must compile PHP with GMP support by using the option. @@ -25,13 +25,13 @@ Most GMP functions accept GMP number arguments, defined as resource below. However, most of these - functions will accept also numeric and string arguments, given - it's possible to convert the latter to number. Also, if there's - faster function that can operate on integer arguments, it would - be used instead of slower function when supplied arguments are + 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 gmp_init function. + number. See also the gmp_init function. @@ -71,7 +71,7 @@ print gmp_strval (fact (1000)) . "\n"; - Creates a GMP number from integer or string. String + Creates a GMP number from an integer or string. String representation can be decimal or hexadecimal. In the latter case, the string should start with 0x. @@ -116,7 +116,7 @@ print gmp_strval (fact (1000)) . "\n"; This function allows to convert GMP number to integer. - This function returns useful result only if the number actually + This function returns a useful result only if the number actually fits the PHP integer (i.e., signed long type). If you want just to print the GMP number, use gmp_strval. @@ -148,7 +148,7 @@ print gmp_strval (fact (1000)) . "\n"; - Converting GMP number to string + Converting a GMP number to a string <?php $a = gmp_init("0x41682179fbf5"); @@ -175,7 +175,7 @@ print gmp_strval (fact (1000)) . "\n"; - Add two GMP numbers. The result will be GMP number representing + Add two GMP numbers. The result will be a GMP number representing the sum of the arguments. @@ -196,7 +196,7 @@ print gmp_strval (fact (1000)) . "\n"; - Subtract b from a + Subtracts b from a and returns the result. @@ -438,7 +438,7 @@ print gmp_strval (fact (1000)) . "\n"; - Returns positive value if a > b, zero if + Returns a positive value if a > b, zero if a = b and negative value if a < b. @@ -578,7 +578,7 @@ print gmp_strval (fact (1000)) . "\n"; - Returns true if a is a prefect square, + Returns true if a is a perfect square, false otherwise. @@ -679,7 +679,7 @@ print gmp_strval (fact (1000)) . "\n"; Calculate greatest common divisor of a and b. The result is always positive even if - either of or both input operands are negative. + either of, or both, input operands are negative. @@ -700,8 +700,8 @@ print gmp_strval (fact (1000)) . "\n"; Calculates g, s, and t, such that a*s + b*t = g = - gcd(a,b), where gcd is gretest common divisor. Returns - array with respective elements g, s and t. + gcd(a,b), where gcd is the greatest common divisor. Returns + an array with respective elements g, s and t. diff --git a/language/types.xml b/language/types.xml index d67b51b3c2..5188d2990b 100644 --- a/language/types.xml +++ b/language/types.xml @@ -104,7 +104,7 @@ $a = 1.234; $a = 1.2e3; never compare floating point numbers for equality. If you really need higher precision, you should use the arbitrary precision math functions - instead. + or gmp functions instead.