betz Mon May 6 06:56:21 2002 EDT Added files: /phpdoc/en/reference/gmp constants.xml
Modified files: /phpdoc/en/reference/gmp reference.xml Log: new structure and constants extra Index: phpdoc/en/reference/gmp/reference.xml diff -u phpdoc/en/reference/gmp/reference.xml:1.2 phpdoc/en/reference/gmp/reference.xml:1.3 --- phpdoc/en/reference/gmp/reference.xml:1.2 Mon Apr 15 14:56:39 2002 +++ phpdoc/en/reference/gmp/reference.xml Mon May 6 06:56:21 2002 @@ -1,56 +1,83 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <reference id="ref.gmp"> <title>GMP functions</title> <titleabbrev>GMP</titleabbrev> <partintro> - <simpara> - These functions allow you to work with arbitrary-length integers - using the GNU <acronym>MP</acronym> library. In order to have these - functions available, you must compile PHP with - <acronym>GMP</acronym> support by using the <option - role="configure">--with-gmp</option> option. - </simpara> - <simpara> - You can download the <acronym>GMP</acronym> library from <ulink - url="&url.gmp;">&url.gmp;</ulink>. This site also has the - <acronym>GMP</acronym> manual available. - </simpara> - <simpara> - You will need GMP version 2 or better to use these functions. Some - functions may require more recent version of the GMP library. - </simpara> - <simpara> - These functions have been added in PHP 4.0.4. - </simpara> - <note> + + <section id="gmp.intro"> + &reftitle.intro; + <simpara> + These functions allow you to work with arbitrary-length integers + using the GNU <acronym>MP</acronym> library. + </simpara> + <simpara> + These functions have been added in PHP 4.0.4. + </simpara> + <note> + <para> + Most GMP functions accept GMP number arguments, defined as + <literal>resource</literal> 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 <function>gmp_init</function> function. + </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. + </simpara> + </warning> + </section> + + <section id="gmp.requirenments"> + &reftitle.required; <para> - Most GMP functions accept GMP number arguments, defined as - <literal>resource</literal> 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 <function>gmp_init</function> function. + You can download the <acronym>GMP</acronym> library from <ulink + url="&url.gmp;">&url.gmp;</ulink>. This site also has the + <acronym>GMP</acronym> manual available. </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. + You will need GMP version 2 or better to use these functions. Some + functions may require more recent version of the GMP library. </simpara> - </warning> - - <para> - <example> - <title>Factorial function using GMP</title> - <programlisting role="php"> + </section> + + <section id="gmp.installation"> + &reftitle.install; + <para> + In order to have these functions available, you must compile PHP with + <acronym>GMP</acronym> support by using the <option + role="configure">--with-gmp</option> option. + </para> + </section> + + <section id="gmp.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="gmp.resources"> + &reftitle.resources; + &no.resource; + </section> + + &reference.gmp.constants; + + <section id="gmp.examples"> + &reftitle.examples; + <para> + <example> + <title>Factorial function using GMP</title> + <programlisting role="php"> <![CDATA[ <?php function fact ($x) { @@ -63,13 +90,24 @@ print gmp_strval (fact (1000)) . "\n"; ?> ]]> - </programlisting> + </programlisting> </example> - </para> - <para> - This will calculate factorial of 1000 (pretty big number) - very fast. - </para> + </para> + <para> + This will calculate factorial of 1000 (pretty big number) + very fast. + </para> + </section> + + <section id="gmp.seealso"> + &reftitle.seealso; + <para> + More mathmatical functions can be found in the sections + <link linkend="ref.bc">BCMath Arbitrary Precision Mathematics Functions</link> + and <link linkend="ref.math">Mathematical Functions</link>. + </para> + </section> + </partintro> &reference.gmp.functions; Index: phpdoc/en/reference/gmp/constants.xml +++ phpdoc/en/reference/gmp/constants.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <section id="xxx.constants"> &reftitle.constants; &extension.constants; <variablelist> <varlistentry> <term> <constant>GMP_ROUND_ZERO</constant> (<link linkend="language.types.integer">integer</link>) </term> <listitem> <simpara> </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>GMP_ROUND_PLUSINF</constant> (<link linkend="language.types.integer">integer</link>) </term> <listitem> <simpara> </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>GMP_ROUND_MINUSINF</constant> (<link linkend="language.types.integer">integer</link>) </term> <listitem> <simpara> </simpara> </listitem> </varlistentry> </variablelist> </section> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->