svn: /phpdoc/en/trunk/reference/gmp/ book.xml configure.xml functions/gmp-init.xml functions/gmp-intval.xml setup.xml
| From: | Thomas Punt | Date: | Fri, 18 Dec 2015 17:47:52 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/gmp/ book.xml configure.xml functions/gmp-init.xml functions/gmp-intval.xml setup.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13912@lists.php.net to get a copy of this message | ||
tpunt Fri, 18 Dec 2015 17:47:52 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=338302
Log:
Rephrase some of the GMP descriptions
Changed paths:
U phpdoc/en/trunk/reference/gmp/book.xml
U phpdoc/en/trunk/reference/gmp/configure.xml
U phpdoc/en/trunk/reference/gmp/functions/gmp-init.xml
U phpdoc/en/trunk/reference/gmp/functions/gmp-intval.xml
U phpdoc/en/trunk/reference/gmp/setup.xml
Modified: phpdoc/en/trunk/reference/gmp/book.xml
===================================================================
--- phpdoc/en/trunk/reference/gmp/book.xml 2015-12-18 17:21:47 UTC (rev 338301)
+++ phpdoc/en/trunk/reference/gmp/book.xml 2015-12-18 17:47:52 UTC (rev 338302)
@@ -10,8 +10,8 @@
<preface xml:id="intro.gmp">
&reftitle.intro;
<simpara>
- These functions allow you to work with arbitrary-length integers
- using the GNU <acronym>MP</acronym> library.
+ These functions allow for arbitrary-length integers to be worked with using
+ the GNU <acronym>MP</acronym> library.
</simpara>
<simpara>
These functions have been added in PHP 4.0.4.
@@ -19,34 +19,29 @@
<note>
<para>
Most GMP functions accept GMP number arguments. These are shown in this
- documentation as <classname>GMP</classname> objects; however note that PHP
+ documentation as <classname>GMP</classname> objects. However, note that PHP
5.5 and earlier represented GMP numbers as <type>resource</type>s. Most
of these functions will also accept numeric and string arguments, so long
- as 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
+ as it is possible to convert the latter to a number. Also, if there is a
+ more performant function that can operate on the arguments (integers only),
+ then it will be used instead (this is done transparently). See also the
<function>gmp_init</function> function.
</para>
</note>
<note>
<para>
- From PHP 5.6 onwards, you can use
+ From PHP 5.6 onwards, the
<link linkend="language.operators.arithmetic">arithmetic</link>,
- <link linkend="language.operators.bitwise">bitwise</link> and
+ <link linkend="language.operators.bitwise">bitwise</link>, and
<link linkend="language.operators.comparison">comparison</link> operators
- with the <classname>GMP</classname> objects returned from
+ may be used with the <classname>GMP</classname> objects returned from
<function>gmp_init</function> and other GMP functions.
</para>
</note>
<warning>
<simpara>
- 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 <literal>GMP</literal>
- comes into play.
+ Large integers must be specified as strings - otherwise, PHP will coerce
+ them to floats, resulting in a loss of precision.
</simpara>
</warning>
<note>
Modified: phpdoc/en/trunk/reference/gmp/configure.xml
===================================================================
--- phpdoc/en/trunk/reference/gmp/configure.xml 2015-12-18 17:21:47 UTC (rev 338301)
+++ phpdoc/en/trunk/reference/gmp/configure.xml 2015-12-18 17:47:52 UTC (rev 338302)
@@ -3,7 +3,7 @@
<section xml:id="gmp.installation" xmlns="http://docbook.org/ns/docbook">
&reftitle.install;
<para>
- In order to have these functions available, you must compile PHP with
+ In order to have these functions available, PHP must be compiled with
<acronym>GMP</acronym> support by using the <option
role="configure">--with-gmp</option> option.
</para>
Modified: phpdoc/en/trunk/reference/gmp/functions/gmp-init.xml
===================================================================
--- phpdoc/en/trunk/reference/gmp/functions/gmp-init.xml 2015-12-18 17:21:47 UTC (rev 338301)
+++ phpdoc/en/trunk/reference/gmp/functions/gmp-init.xml 2015-12-18 17:47:52 UTC (rev 338302)
@@ -113,12 +113,11 @@
&reftitle.notes;
<note>
<para>
- It is not necessary to call this function if you want to use
- integer or string in place of GMP number in GMP functions, like
- <function>gmp_add</function>. Function arguments are
- automatically converted to GMP numbers, if such conversion is
- possible and needed, using the same rules as
- <function>gmp_init</function>.
+ It is not necessary to call this function in order to use integers or
+ strings in place of GMP numbers in GMP functions (such as with
+ <function>gmp_add</function>). Function arguments are automatically
+ converted to GMP numbers, if such conversion is possible and needed, using
+ the same rules as <function>gmp_init</function>.
</para>
</note>
</refsect1>
Modified: phpdoc/en/trunk/reference/gmp/functions/gmp-intval.xml
===================================================================
--- phpdoc/en/trunk/reference/gmp/functions/gmp-intval.xml 2015-12-18 17:21:47 UTC (rev 338301)
+++ phpdoc/en/trunk/reference/gmp/functions/gmp-intval.xml 2015-12-18 17:47:52 UTC (rev 338302)
@@ -74,8 +74,8 @@
<warning>
<simpara>
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 <function>gmp_strval</function>.
+ fits the PHP integer (i.e., signed long type). To simply print the GMP
+ number, use <function>gmp_strval</function>.
</simpara>
</warning>
</refsect1>
Modified: phpdoc/en/trunk/reference/gmp/setup.xml
===================================================================
--- phpdoc/en/trunk/reference/gmp/setup.xml 2015-12-18 17:21:47 UTC (rev 338301)
+++ phpdoc/en/trunk/reference/gmp/setup.xml 2015-12-18 17:47:52 UTC (rev 338302)
@@ -8,13 +8,13 @@
<section xml:id="gmp.requirements">
&reftitle.required;
<para>
- You can download the <acronym>GMP</acronym> library from <link
+ The <acronym>GMP</acronym> library can be downloaded from <link
xlink:href="&url.gmp;">&url.gmp;</link>. This site also has the
<acronym>GMP</acronym> manual available.
</para>
<simpara>
- You will need <acronym>GMP</acronym> version 2 or better to use these functions.
Some
- functions may require more recent version of the <acronym>GMP</acronym> library.
+ At least <acronym>GMP</acronym> version 2 is required, with some functions
+ requiring a more recent version of the <acronym>GMP</acronym> library.
</simpara>
</section>
<!-- }}} -->