mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Generate gmp methodsynopses based on stubs
Closes GH-225. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352046 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
053609a5c9
commit
039ab719e6
49 changed files with 344 additions and 332 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-abs">
|
||||
<refentry xml:id="function.gmp-abs" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_abs</refname>
|
||||
<refpurpose>Absolute value</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_abs</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the absolute value of a number.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the absolute value of <parameter>a</parameter>, as a GMP number.
|
||||
Returns the absolute value of <parameter>num</parameter>, as a GMP number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -65,7 +65,6 @@ echo gmp_strval($abs2) . "\n";
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-add">
|
||||
<refentry xml:id="function.gmp-add" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_add</refname>
|
||||
<refpurpose>Add numbers</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_add</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Add two numbers.
|
||||
|
@ -23,7 +23,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The first summand (augent).
|
||||
|
@ -32,7 +32,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The second summand (addend).
|
||||
|
@ -75,7 +75,6 @@ echo gmp_strval($sum) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-and">
|
||||
<refentry xml:id="function.gmp-and" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_and</refname>
|
||||
<refpurpose>Bitwise AND</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_and</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates bitwise AND of two GMP numbers.
|
||||
|
@ -23,13 +23,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -70,7 +70,6 @@ echo gmp_strval($and2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.gmp-binomial" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>gmp_binomial</refname>
|
||||
|
@ -10,10 +9,10 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>GMP</type><type>false</type></type><methodname>gmp_binomial</methodname>
|
||||
<methodparam><type>mixed</type><parameter>n</parameter></methodparam>
|
||||
<type>GMP</type><methodname>gmp_binomial</methodname>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>n</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>k</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates the binomial coefficient C(n, k).
|
||||
</para>
|
||||
|
@ -45,20 +44,41 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the binomial coefficient C(n, k), &return.falseforfailure;.
|
||||
Returns the binomial coefficient C(n, k).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Issues E_WARNING if <parameter>k</parameter> is negative.
|
||||
Throws <classname>ValueError</classname> if <parameter>k</parameter> is negative.
|
||||
Prior to PHP 8.0.0, <constant>E_WARNING</constant> was issued instead.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
This function no longer returns &false; on failure.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-clrbit">
|
||||
<refentry xml:id="function.gmp-clrbit" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_clrbit</refname>
|
||||
<refpurpose>Clear bit</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>gmp_clrbit</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Clears (sets to 0) bit <parameter>index</parameter> in
|
||||
<parameter>a</parameter>. The index starts at 0.
|
||||
<parameter>num</parameter>. The index starts at 0.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -75,7 +75,7 @@ echo gmp_strval($a) . "\n";
|
|||
<note>
|
||||
<para>
|
||||
Unlike most of the other GMP functions, <function>gmp_clrbit</function>
|
||||
must be called with a GMP resource that already exists (using
|
||||
must be called with a GMP object that already exists (using
|
||||
<function>gmp_init</function> for example). One will not be
|
||||
automatically created.
|
||||
</para>
|
||||
|
@ -93,7 +93,6 @@ echo gmp_strval($a) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-cmp">
|
||||
<refentry xml:id="function.gmp-cmp" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_cmp</refname>
|
||||
<refpurpose>Compare numbers</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_cmp</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Compares two numbers.
|
||||
|
@ -23,13 +23,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -72,7 +72,6 @@ echo "$cmp1 $cmp2 $cmp3\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id='function.gmp-com'>
|
||||
<refentry xml:id="function.gmp-com" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_com</refname>
|
||||
<refpurpose>Calculates one's complement</refpurpose>
|
||||
|
@ -10,10 +10,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_com</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the one's complement of <parameter>a</parameter>.
|
||||
Returns the one's complement of <parameter>num</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the one's complement of <parameter>a</parameter>, as a GMP number.
|
||||
Returns the one's complement of <parameter>num</parameter>, as a GMP number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -60,7 +60,6 @@ echo gmp_strval($com) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-div-q">
|
||||
<refentry xml:id="function.gmp-div-q" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_div_q</refname>
|
||||
<refpurpose>Divide numbers</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_div_q</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>round</parameter><initializer>GMP_ROUND_ZERO</initializer></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>rounding_mode</parameter><initializer><constant>GMP_ROUND_ZERO</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Divides <parameter>a</parameter> by <parameter>b</parameter> and
|
||||
Divides <parameter>num1</parameter> by <parameter>num2</parameter> and
|
||||
returns the integer result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being divided.
|
||||
|
@ -34,20 +34,20 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number that <parameter>a</parameter> is being divided by.
|
||||
The number that <parameter>num1</parameter> is being divided by.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>round</parameter></term>
|
||||
<term><parameter>rounding_mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The result rounding is defined by the
|
||||
<parameter>round</parameter>, which can have the following
|
||||
<parameter>rounding_mode</parameter>, which can have the following
|
||||
values:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
@ -143,7 +143,6 @@ echo gmp_strval($div5) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-div-qr">
|
||||
<refentry xml:id="function.gmp-div-qr" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_div_qr</refname>
|
||||
<refpurpose>Divide numbers and get quotient and remainder</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>gmp_div_qr</methodname>
|
||||
<methodparam><type>GMP</type><parameter>n</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>d</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>round</parameter><initializer>GMP_ROUND_ZERO</initializer></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>rounding_mode</parameter><initializer><constant>GMP_ROUND_ZERO</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The function divides <parameter>n</parameter> by <parameter>d</parameter>.
|
||||
The function divides <parameter>num1</parameter> by <parameter>num2</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>n</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being divided.
|
||||
|
@ -33,20 +33,20 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>d</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number that <parameter>n</parameter> is being divided by.
|
||||
The number that <parameter>num1</parameter> is being divided by.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>round</parameter></term>
|
||||
<term><parameter>rounding_mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
See the <function>gmp_div_q</function> function for description
|
||||
of the <parameter>round</parameter> argument.
|
||||
of the <parameter>rounding_mode</parameter> argument.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -93,7 +93,6 @@ printf("Result is: q - %s, r - %s",
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-div-r">
|
||||
<refentry xml:id="function.gmp-div-r" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_div_r</refname>
|
||||
<refpurpose>Remainder of the division of numbers</refpurpose>
|
||||
|
@ -10,14 +10,14 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_div_r</methodname>
|
||||
<methodparam><type>GMP</type><parameter>n</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>d</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>round</parameter><initializer>GMP_ROUND_ZERO</initializer></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>rounding_mode</parameter><initializer><constant>GMP_ROUND_ZERO</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates remainder of the integer division of
|
||||
<parameter>n</parameter> by <parameter>d</parameter>. The
|
||||
remainder has the sign of the <parameter>n</parameter> argument,
|
||||
<parameter>num1</parameter> by <parameter>num2</parameter>. The
|
||||
remainder has the sign of the <parameter>num1</parameter> argument,
|
||||
if not zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>n</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being divided.
|
||||
|
@ -36,20 +36,20 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>d</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number that <parameter>n</parameter> is being divided by.
|
||||
The number that <parameter>num1</parameter> is being divided by.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>round</parameter></term>
|
||||
<term><parameter>rounding_mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
See the <function>gmp_div_q</function> function for description
|
||||
of the <parameter>round</parameter> argument.
|
||||
of the <parameter>rounding_mode</parameter> argument.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -98,7 +98,6 @@ echo gmp_strval($div) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-divexact">
|
||||
<refentry xml:id="function.gmp-divexact" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_divexact</refname>
|
||||
<refpurpose>Exact division of numbers</refpurpose>
|
||||
|
@ -10,14 +10,14 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_divexact</methodname>
|
||||
<methodparam><type>GMP</type><parameter>n</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>d</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Divides <parameter>n</parameter> by <parameter>d</parameter>,
|
||||
Divides <parameter>num1</parameter> by <parameter>num2</parameter>,
|
||||
using fast "exact division" algorithm. This function produces
|
||||
correct results only when it is known in advance that
|
||||
<parameter>d</parameter> divides <parameter>n</parameter>.
|
||||
<parameter>num2</parameter> divides <parameter>num1</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>n</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being divided.
|
||||
|
@ -35,7 +35,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>d</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number that <parameter>a</parameter> is being divided by.
|
||||
|
@ -82,7 +82,6 @@ echo gmp_strval($div2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-export">
|
||||
<refentry xml:id="function.gmp-export" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_export</refname>
|
||||
<refpurpose>Export to a binary string</refpurpose>
|
||||
|
@ -9,10 +9,10 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>gmp_export</methodname>
|
||||
<methodparam><type>GMP</type><parameter>gmpnumber</parameter></methodparam>
|
||||
<type>string</type><methodname>gmp_export</methodname>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>word_size</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer><constant>GMP_MSW_FIRST</constant> | <constant>GMP_NATIVE_ENDIAN</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>GMP_MSW_FIRST</constant> | <constant>GMP_NATIVE_ENDIAN</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Export a GMP number to a binary string
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>gmpnumber</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The GMP number being exported
|
||||
|
@ -40,7 +40,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
|
||||
|
@ -54,10 +54,32 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a string&return.falseforfailure;.
|
||||
Returns a string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
This function no longer returns &false; on failure.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -91,7 +113,6 @@ AA
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-fact">
|
||||
<refentry xml:id="function.gmp-fact" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_fact</refname>
|
||||
<refpurpose>Factorial</refpurpose>
|
||||
|
@ -10,10 +10,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_fact</methodname>
|
||||
<methodparam><type>mixed</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates factorial (<literal>a!</literal>) of <parameter>a</parameter>.
|
||||
Calculates factorial (<literal>a!</literal>) of <parameter>num</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The factorial number.
|
||||
|
@ -69,7 +69,6 @@ echo gmp_strval($fact2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-gcd">
|
||||
<refentry xml:id="function.gmp-gcd" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_gcd</refname>
|
||||
<refpurpose>Calculate GCD</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_gcd</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculate greatest common divisor of <parameter>a</parameter> and
|
||||
<parameter>b</parameter>. The result is always positive even if
|
||||
Calculate greatest common divisor of <parameter>num1</parameter> and
|
||||
<parameter>num2</parameter>. The result is always positive even if
|
||||
either of, or both, input operands are negative.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -25,13 +25,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -44,7 +44,7 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
A positive GMP number that divides into both
|
||||
<parameter>a</parameter> and <parameter>b</parameter>.
|
||||
<parameter>num1</parameter> and <parameter>num2</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -79,7 +79,6 @@ echo gmp_strval($gcd) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>gmp_gcdext</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates g, s, and t, such that <literal>a*s + b*t = g =
|
||||
|
@ -32,13 +32,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -89,7 +89,6 @@ if ($check_gcd && $check_res) {
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-hamdist">
|
||||
<refentry xml:id="function.gmp-hamdist" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_hamdist</refname>
|
||||
<refpurpose>Hamming distance</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_hamdist</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hamming distance between <parameter>a</parameter> and
|
||||
<parameter>b</parameter>. Both operands should be non-negative.
|
||||
Returns the hamming distance between <parameter>num1</parameter> and
|
||||
<parameter>num2</parameter>. Both operands should be non-negative.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
<para>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
<para>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The hamming distance between <parameter>a</parameter> and <parameter>b</parameter>, as an <type>int</type>.
|
||||
The hamming distance between <parameter>num1</parameter> and <parameter>num2</parameter>, as an <type>int</type>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -91,7 +91,6 @@ echo gmp_popcount(gmp_xor($ham1, $ham2)) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-import">
|
||||
<refentry xml:id="function.gmp-import" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_import</refname>
|
||||
<refpurpose>Import from a binary string</refpurpose>
|
||||
|
@ -9,10 +9,10 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>GMP</type><type>false</type></type><methodname>gmp_import</methodname>
|
||||
<type>GMP</type><methodname>gmp_import</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>word_size</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer><constant>GMP_MSW_FIRST</constant> | <constant>GMP_NATIVE_ENDIAN</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>GMP_MSW_FIRST</constant> | <constant>GMP_NATIVE_ENDIAN</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Import a GMP number from a binary string
|
||||
|
@ -40,7 +40,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
|
||||
|
@ -54,10 +54,32 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a GMP number&return.falseforfailure;.
|
||||
Returns a GMP number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
This function no longer returns &false; on failure.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -95,7 +117,6 @@ echo gmp_strval($number) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-init">
|
||||
<refentry xml:id="function.gmp-init" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_init</refname>
|
||||
<refpurpose>Create GMP number</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_init</methodname>
|
||||
<methodparam><type>mixed</type><parameter>number</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>base</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>number</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An integer or a string. The string representation can be decimal,
|
||||
|
@ -98,7 +98,6 @@ $b = gmp_init("0xFFFFDEBACDFEDF7200");
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-intval">
|
||||
<refentry xml:id="function.gmp-intval" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_intval</refname>
|
||||
<refpurpose>Convert GMP number to integer</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_intval</methodname>
|
||||
<methodparam><type>GMP</type><parameter>gmpnumber</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function converts GMP number into native PHP <type>int</type>s.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>gmpnumber</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The <type>int</type> value of <parameter>gmpnumber</parameter>.
|
||||
The <type>int</type> value of <parameter>num</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -81,7 +81,6 @@ echo gmp_strval("2147483648") . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-invert">
|
||||
<refentry xml:id="function.gmp-invert" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_invert</refname>
|
||||
<refpurpose>Inverse by modulo</refpurpose>
|
||||
|
@ -9,13 +9,13 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_invert</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<type class="union"><type>GMP</type><type>false</type></type><methodname>gmp_invert</methodname>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Computes the inverse of <parameter>a</parameter> modulo
|
||||
<parameter>b</parameter>.
|
||||
Computes the inverse of <parameter>num1</parameter> modulo
|
||||
<parameter>num2</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,13 +24,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -71,7 +71,6 @@ echo gmp_strval($invert) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_jacobi</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>p</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Computes
|
||||
<link xlink:href="&url.jacobi;">Jacobi symbol</link> of <parameter>a</parameter> and
|
||||
<parameter>p</parameter>. <parameter>p</parameter> should be odd
|
||||
<link xlink:href="&url.jacobi;">Jacobi symbol</link> of <parameter>num1</parameter> and
|
||||
<parameter>num2</parameter>. <parameter>num2</parameter> should be odd
|
||||
and must be positive.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -26,13 +26,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>p</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
<para>
|
||||
|
@ -84,7 +84,6 @@ echo gmp_jacobi("2", "3") . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.gmp-kronecker" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>gmp_kronecker</refname>
|
||||
|
@ -11,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_kronecker</methodname>
|
||||
<methodparam><type>mixed</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function computes the Kronecker symbol of <parameter>a</parameter> and
|
||||
<parameter>b</parameter>.
|
||||
This function computes the Kronecker symbol of <parameter>num1</parameter> and
|
||||
<parameter>num2</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,13 +23,13 @@
|
|||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -41,8 +40,8 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the Kronecker symbol of <parameter>a</parameter> and
|
||||
<parameter>b</parameter>
|
||||
Returns the Kronecker symbol of <parameter>num1</parameter> and
|
||||
<parameter>num2</parameter>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -55,7 +54,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.gmp-lcm" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>gmp_lcm</refname>
|
||||
|
@ -11,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_lcm</methodname>
|
||||
<methodparam><type>mixed</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function computes the least common multiple (lcm) of
|
||||
<parameter>a</parameter> and <parameter>b</parameter>.
|
||||
<parameter>num1</parameter> and <parameter>num2</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,13 +23,13 @@
|
|||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -53,7 +52,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_legendre</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>p</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Compute the
|
||||
<link xlink:href="&url.symbole-legendre;">
|
||||
Legendre symbol</link> of <parameter>a</parameter> and
|
||||
<parameter>p</parameter>. <parameter>p</parameter> should be odd
|
||||
Legendre symbol</link> of <parameter>num1</parameter> and
|
||||
<parameter>num2</parameter>. <parameter>num2</parameter> should be odd
|
||||
and must be positive.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -27,13 +27,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>p</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
<para>
|
||||
|
@ -85,7 +85,6 @@ echo gmp_legendre("2", "3") . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-mod">
|
||||
<refentry xml:id="function.gmp-mod" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_mod</refname>
|
||||
<refpurpose>Modulo operation</refpurpose>
|
||||
|
@ -10,13 +10,13 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_mod</methodname>
|
||||
<methodparam><type>GMP</type><parameter>n</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>d</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates <parameter>n</parameter> modulo
|
||||
<parameter>d</parameter>. The result is always non-negative, the
|
||||
sign of <parameter>d</parameter> is ignored.
|
||||
Calculates <parameter>num1</parameter> modulo
|
||||
<parameter>num2</parameter>. The result is always non-negative, the
|
||||
sign of <parameter>num2</parameter> is ignored.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -25,13 +25,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>n</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>d</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The modulo that is being evaluated.
|
||||
|
@ -74,7 +74,6 @@ echo gmp_strval($mod) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-mul">
|
||||
<refentry xml:id="function.gmp-mul" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_mul</refname>
|
||||
<refpurpose>Multiply numbers</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_mul</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Multiplies <parameter>a</parameter> by <parameter>b</parameter>
|
||||
Multiplies <parameter>num1</parameter> by <parameter>num2</parameter>
|
||||
and returns the result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -24,19 +24,19 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A number that will be multiplied by <parameter>b</parameter>.
|
||||
A number that will be multiplied by <parameter>num2</parameter>.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A number that will be multiplied by <parameter>a</parameter>.
|
||||
A number that will be multiplied by <parameter>num1</parameter>.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -76,7 +76,6 @@ echo gmp_strval($mul) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-neg">
|
||||
<refentry xml:id="function.gmp-neg" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_neg</refname>
|
||||
<refpurpose>Negate number</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_neg</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the negative value of a number.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns -<parameter>a</parameter>, as a GMP number.
|
||||
Returns -<parameter>num</parameter>, as a GMP number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -65,7 +65,6 @@ echo gmp_strval($neg2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-nextprime">
|
||||
<refentry xml:id="function.gmp-nextprime" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_nextprime</refname>
|
||||
<refpurpose>Find next prime number</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_nextprime</methodname>
|
||||
<methodparam><type>int</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Find next prime number
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Return the next prime number greater than <parameter>a</parameter>,
|
||||
Return the next prime number greater than <parameter>num</parameter>,
|
||||
as a GMP number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -77,7 +77,6 @@ echo gmp_strval($prime2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-or">
|
||||
<refentry xml:id="function.gmp-or" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_or</refname>
|
||||
<refpurpose>Bitwise OR</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_or</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates bitwise inclusive OR of two GMP numbers.
|
||||
|
@ -23,13 +23,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -72,7 +72,6 @@ fffffff2
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.gmp-perfect-power" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>gmp_perfect_power</refname>
|
||||
|
@ -11,10 +10,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>gmp_perfect_power</methodname>
|
||||
<methodparam><type>mixed</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks whether <parameter>a</parameter> is a perfect power.
|
||||
Checks whether <parameter>num</parameter> is a perfect power.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -22,7 +21,7 @@
|
|||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -33,7 +32,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if <parameter>a</parameter> is a perfect power, &false; otherwise.
|
||||
Returns &true; if <parameter>num</parameter> is a perfect power, &false; otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -45,7 +44,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-perfect-square">
|
||||
<refentry xml:id="function.gmp-perfect-square" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_perfect_square</refname>
|
||||
<refpurpose>Perfect square check</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>gmp_perfect_square</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Check if a number is a perfect square.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being checked as a perfect square.
|
||||
|
@ -37,7 +37,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if <parameter>a</parameter> is a perfect square,
|
||||
Returns &true; if <parameter>num</parameter> is a perfect square,
|
||||
&false; otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -85,7 +85,6 @@ bool(true)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-popcount">
|
||||
<refentry xml:id="function.gmp-popcount" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_popcount</refname>
|
||||
<refpurpose>Population count</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_popcount</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the population count.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The population count of <parameter>a</parameter>, as an <type>int</type>.
|
||||
The population count of <parameter>num</parameter>, as an <type>int</type>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -65,7 +65,6 @@ echo gmp_popcount($pop2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-pow">
|
||||
<refentry xml:id="function.gmp-pow" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_pow</refname>
|
||||
<refpurpose>Raise number into power</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_pow</methodname>
|
||||
<methodparam><type>GMP</type><parameter>base</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>exp</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>exponent</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Raise <parameter>base</parameter> into power <parameter>exp</parameter>.
|
||||
Raise <parameter>num</parameter> into power <parameter>exponent</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>base</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The base number.
|
||||
|
@ -32,10 +32,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exp</parameter></term>
|
||||
<term><parameter>exponent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The positive power to raise the <parameter>base</parameter>.
|
||||
The positive power to raise the <parameter>num</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -80,7 +80,6 @@ echo gmp_strval($pow3) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-powm">
|
||||
<refentry xml:id="function.gmp-powm" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_powm</refname>
|
||||
<refpurpose>Raise number into power with modulo</refpurpose>
|
||||
|
@ -10,14 +10,14 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_powm</methodname>
|
||||
<methodparam><type>GMP</type><parameter>base</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>exp</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>mod</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>exponent</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>modulus</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculate (<parameter>base</parameter> raised into power
|
||||
<parameter>exp</parameter>) modulo <parameter>mod</parameter>. If
|
||||
<parameter>exp</parameter> is negative, result is undefined.
|
||||
Calculate (<parameter>num</parameter> raised into power
|
||||
<parameter>exponent</parameter>) modulo <parameter>modulus</parameter>. If
|
||||
<parameter>exponent</parameter> is negative, result is undefined.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>base</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The base number.
|
||||
|
@ -36,16 +36,16 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exp</parameter></term>
|
||||
<term><parameter>exponent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The positive power to raise the <parameter>base</parameter>.
|
||||
The positive power to raise the <parameter>num</parameter>.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mod</parameter></term>
|
||||
<term><parameter>modulus</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The modulo.
|
||||
|
@ -88,7 +88,6 @@ echo gmp_strval($pow1) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-prob-prime">
|
||||
<refentry xml:id="function.gmp-prob-prime" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_prob_prime</refname>
|
||||
<refpurpose>Check if number is "probably prime"</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_prob_prime</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>reps</parameter><initializer>10</initializer></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>repetitions</parameter><initializer>10</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The function uses Miller-Rabin's probabilistic test to check if a number is a prime.
|
||||
|
@ -23,7 +23,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being checked as a prime.
|
||||
|
@ -32,11 +32,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>reps</parameter></term>
|
||||
<term><parameter>repetitions</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Reasonable values
|
||||
of <parameter>reps</parameter> vary from 5 to 10 (default being
|
||||
of <parameter>repetitions</parameter> vary from 5 to 10 (default being
|
||||
10); a higher value lowers the probability for a non-prime to
|
||||
pass as a "probable" prime.
|
||||
</para>
|
||||
|
@ -50,10 +50,10 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
If this function returns 0, <parameter>a</parameter> is
|
||||
If this function returns 0, <parameter>num</parameter> is
|
||||
definitely not prime. If it returns 1, then
|
||||
<parameter>a</parameter> is "probably" prime. If it returns 2,
|
||||
then <parameter>a</parameter> is surely prime.
|
||||
<parameter>num</parameter> is "probably" prime. If it returns 2,
|
||||
then <parameter>num</parameter> is surely prime.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -89,7 +89,6 @@ echo gmp_prob_prime("11") . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-random-seed">
|
||||
<refentry xml:id="function.gmp-random-seed" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_random_seed</refname>
|
||||
<refpurpose>Sets the RNG seed</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>gmp_random_seed</methodname>
|
||||
<methodparam><type>mixed</type><parameter>seed</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
|
||||
|
@ -96,7 +96,6 @@ bool(false)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-root">
|
||||
<refentry xml:id="function.gmp-root" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_root</refname>
|
||||
<refpurpose>Take the integer part of nth root</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_root</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>nth</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Takes the <parameter>nth</parameter> root of <parameter>a</parameter> and
|
||||
Takes the <parameter>nth</parameter> root of <parameter>num</parameter> and
|
||||
returns the integer component of the result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<term><parameter>nth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The positive root to take of <parameter>a</parameter>.
|
||||
The positive root to take of <parameter>num</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -48,7 +48,6 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-rootrem">
|
||||
<refentry xml:id="function.gmp-rootrem" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_rootrem</refname>
|
||||
<refpurpose>Take the integer part and remainder of nth root</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>gmp_rootrem</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>nth</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Takes the <parameter>nth</parameter> root of <parameter>a</parameter> and
|
||||
Takes the <parameter>nth</parameter> root of <parameter>num</parameter> and
|
||||
returns the integer component and remainder of the result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<term><parameter>nth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The positive root to take of <parameter>a</parameter>.
|
||||
The positive root to take of <parameter>num</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -50,7 +50,6 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_scan0</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>start</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Scans <parameter>a</parameter>, starting with bit
|
||||
Scans <parameter>num1</parameter>, starting with bit
|
||||
<parameter>start</parameter>, towards more significant bits,
|
||||
until the first clear bit is found.
|
||||
</para>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number to scan.
|
||||
|
@ -83,7 +83,6 @@ echo gmp_scan0($s2, 5) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_scan1</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>start</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Scans <parameter>a</parameter>, starting with bit
|
||||
Scans <parameter>num1</parameter>, starting with bit
|
||||
<parameter>start</parameter>, towards more significant bits,
|
||||
until the first set bit is found.
|
||||
</para>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number to scan.
|
||||
|
@ -83,7 +83,6 @@ echo gmp_scan1($s2, 5) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-setbit">
|
||||
<refentry xml:id="function.gmp-setbit" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_setbit</refname>
|
||||
<refpurpose>Set bit</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>gmp_setbit</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>bit_on</parameter><initializer>&true;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>value</parameter><initializer>&true;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets bit <parameter>index</parameter> in <parameter>a</parameter>.
|
||||
Sets bit <parameter>index</parameter> in <parameter>num</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value to modify.
|
||||
|
@ -41,7 +41,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bit_on</parameter></term>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
True to set the bit (set it to 1/on); false to clear the bit (set it to 0/off).
|
||||
|
@ -133,7 +133,7 @@ echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "\n";
|
|||
<note>
|
||||
<para>
|
||||
Unlike most of the other GMP functions, <function>gmp_setbit</function>
|
||||
must be called with a GMP resource that already exists (using
|
||||
must be called with a GMP object that already exists (using
|
||||
<function>gmp_init</function> for example). One will not be
|
||||
automatically created.
|
||||
</para>
|
||||
|
@ -151,7 +151,6 @@ echo gmp_strval($a), ' -> 0b', gmp_strval($a, 2), "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-sign">
|
||||
<refentry xml:id="function.gmp-sign" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_sign</refname>
|
||||
<refpurpose>Sign of number</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>gmp_sign</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks the sign of a number.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Either a GMP number <type>resource</type> in PHP 5.5 and earlier,
|
||||
|
@ -39,9 +39,9 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns 1 if <parameter>a</parameter> is positive,
|
||||
-1 if <parameter>a</parameter> is negative,
|
||||
and 0 if <parameter>a</parameter> is zero.
|
||||
Returns 1 if <parameter>num</parameter> is positive,
|
||||
-1 if <parameter>num</parameter> is negative,
|
||||
and 0 if <parameter>num</parameter> is zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -87,7 +87,6 @@ echo gmp_sign("0") . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-sqrt">
|
||||
<refentry xml:id="function.gmp-sqrt" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_sqrt</refname>
|
||||
<refpurpose>Calculate square root</refpurpose>
|
||||
|
@ -10,10 +10,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_sqrt</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates square root of <parameter>a</parameter>.
|
||||
Calculates square root of <parameter>num</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -69,7 +69,6 @@ echo gmp_strval($sqrt3) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-sqrtrem">
|
||||
<refentry xml:id="function.gmp-sqrtrem" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_sqrtrem</refname>
|
||||
<refpurpose>Square root with remainder</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>gmp_sqrtrem</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculate the square root of a number, with remainder.
|
||||
|
@ -22,7 +22,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being square rooted.
|
||||
|
@ -38,8 +38,8 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns array where first element is the integer square root of
|
||||
<parameter>a</parameter> and the second is the remainder
|
||||
(i.e., the difference between <parameter>a</parameter> and the
|
||||
<parameter>num</parameter> and the second is the remainder
|
||||
(i.e., the difference between <parameter>num</parameter> and the
|
||||
first element squared).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -75,7 +75,6 @@ echo gmp_strval($sqrt3) . ", " . gmp_strval($sqrt3rem) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-strval">
|
||||
<refentry xml:id="function.gmp-strval" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_strval</refname>
|
||||
<refpurpose>Convert GMP number to string</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>gmp_strval</methodname>
|
||||
<methodparam><type>GMP</type><parameter>gmpnumber</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>base</parameter><initializer>10</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>gmpnumber</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The GMP number that will be converted to a string.
|
||||
|
@ -79,7 +79,6 @@ printf("Decimal: %s, 36-based: %s", gmp_strval($a), gmp_strval($a,36));
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-sub">
|
||||
<refentry xml:id="function.gmp-sub" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_sub</refname>
|
||||
<refpurpose>Subtract numbers</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_sub</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Subtracts <parameter>b</parameter> from <parameter>a</parameter>
|
||||
Subtracts <parameter>num2</parameter> from <parameter>num1</parameter>
|
||||
and returns the result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number being subtracted from.
|
||||
|
@ -34,10 +34,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number subtracted from <parameter>a</parameter>.
|
||||
The number subtracted from <parameter>num1</parameter>.
|
||||
</para>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -77,7 +77,6 @@ echo gmp_strval($sub) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-testbit">
|
||||
<refentry xml:id="function.gmp-testbit" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_testbit</refname>
|
||||
<refpurpose>Tests if a bit is set</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>gmp_testbit</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -93,7 +93,6 @@ bool(true)
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@ -114,4 +113,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
|||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-xor">
|
||||
<refentry xml:id="function.gmp-xor" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_xor</refname>
|
||||
<refpurpose>Bitwise XOR</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_xor</methodname>
|
||||
<methodparam><type>GMP</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>b</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates bitwise exclusive OR (XOR) of two GMP numbers.
|
||||
|
@ -23,13 +23,13 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<term><parameter>num1</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>b</parameter></term>
|
||||
<term><parameter>num2</parameter></term>
|
||||
<listitem>
|
||||
&gmp.parameter;
|
||||
</listitem>
|
||||
|
@ -73,7 +73,6 @@ echo gmp_strval($xor3, 2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-random-range">
|
||||
<refentry xml:id="function.gmp-random-range" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>gmp_random_range</refname>
|
||||
<refpurpose>Random number</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>GMP</type><methodname>gmp_random_range</methodname>
|
||||
<methodparam><type>GMP</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>GMP</type><parameter>max</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Generate a random number. The number will be between
|
||||
|
@ -81,7 +81,6 @@ echo gmp_strval($rand2) . "\n";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue