php-doc-en/reference/gmp/book.xml
2014-06-01 21:58:38 +00:00

88 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<book xml:id="book.gmp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<?phpdoc extension-membership="bundledexternal" ?>
<title>GNU Multiple Precision</title>
<titleabbrev>GMP</titleabbrev>
<!-- {{{ preface -->
<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.
</simpara>
<simpara>
These functions have been added in PHP 4.0.4.
</simpara>
<note>
<para>
Most GMP functions accept GMP number arguments. These are shown in this
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
<function>gmp_init</function> function.
</para>
</note>
<note>
<para>
From PHP 5.6 onwards, you can use
<link linkend="language.operators.arithmetic">arithmetic</link>,
<link linkend="language.operators.bitwise">bitwise</link> and
<link linkend="language.operators.comparison">comparison</link> operators
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.
</simpara>
</warning>
<note>
<simpara>
This extension is available on Windows platforms since PHP 5.1.0.
</simpara>
</note>
</preface>
<!-- }}} -->
&reference.gmp.setup;
&reference.gmp.constants;
&reference.gmp.examples;
&reference.gmp.reference;
&reference.gmp.gmp;
</book>
<!-- 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:"~/.phpdoc/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
-->