Skip to content

Commit 4db5da5

Browse files
Update some gmp functions documentation (#117)
* Sync gmp-cmp with EN * Sync gmp-com with EN * Sync gmp-div-q with EN * Sync gmp-div-qr with EN * Sync gmp-div-r with EN * Sync gmp-div with EN * Sync gmp-divexact.xml with EN * Sync gmp-fact with EN * Sync gmp-gcd with EN
1 parent abe47bb commit 4db5da5

File tree

9 files changed

+733
-278
lines changed

9 files changed

+733
-278
lines changed
Lines changed: 75 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,78 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- splitted from ./it/functions/gmp.xml, last change in rev 1.1 -->
3-
<!-- last change to 'gmp-cmp' in en/ tree in rev 1.1 -->
4-
<!-- EN-Revision: n/a Maintainer: calandra Status: ready -->
5-
<!-- OLD-Revision: 1.25/EN.1.1 -->
6-
<refentry xml:id="function.gmp-cmp" xmlns="http://docbook.org/ns/docbook">
7-
<refnamediv>
8-
<refname>gmp_cmp</refname>
9-
<refpurpose>Confronto di numeri</refpurpose>
10-
</refnamediv>
11-
<refsect1>
12-
<title>Descrizione</title>
13-
<methodsynopsis>
14-
<type>int</type><methodname>gmp_cmp</methodname>
15-
<methodparam><type>resource</type><parameter>a</parameter></methodparam>
16-
<methodparam><type>resource</type><parameter>b</parameter></methodparam>
17-
</methodsynopsis>
18-
<para>
19-
Restituisce un valore positivo se <literal>a > b</literal>, zero se
20-
<literal>a = b</literal> e negativo se <literal>a &lt;
21-
b</literal>.
22-
</para>
23-
</refsect1>
24-
</refentry>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: 039ab719e695141ee54409d26ad828337ec31d6e Maintainer: pastore Status: ready -->
3+
<!-- CREDITS: calandra -->
4+
<refentry xml:id="function.gmp-cmp" xmlns="http://docbook.org/ns/docbook">
5+
<refnamediv>
6+
<refname>gmp_cmp</refname>
7+
<refpurpose>Confronta numeri</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<type>int</type><methodname>gmp_cmp</methodname>
14+
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
15+
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
16+
</methodsynopsis>
17+
<para>
18+
Confronta due numeri.
19+
</para>
20+
</refsect1>
2521

22+
<refsect1 role="parameters">
23+
&reftitle.parameters;
24+
<para>
25+
<variablelist>
26+
<varlistentry>
27+
<term><parameter>num1</parameter></term>
28+
<listitem>
29+
&gmp.parameter;
30+
</listitem>
31+
</varlistentry>
32+
<varlistentry>
33+
<term><parameter>num2</parameter></term>
34+
<listitem>
35+
&gmp.parameter;
36+
</listitem>
37+
</varlistentry>
38+
</variablelist>
39+
</para>
40+
</refsect1>
41+
42+
<refsect1 role="returnvalues">
43+
&reftitle.returnvalues;
44+
<para>
45+
Restituisce un valore positivo se <literal>a &gt; b</literal>, zero se
46+
<literal>a = b</literal> e un valore negativo se <literal>a &lt;
47+
b</literal>.
48+
</para>
49+
</refsect1>
50+
51+
<refsect1 role="examples">
52+
&reftitle.examples;
53+
<example>
54+
<title>Esempio di <function>gmp_cmp</function></title>
55+
<programlisting role="php">
56+
<![CDATA[
57+
<?php
58+
$cmp1 = gmp_cmp("1234", "1000"); // maggiore di
59+
$cmp2 = gmp_cmp("1000", "1234"); // minore di
60+
$cmp3 = gmp_cmp("1234", "1234"); // uguale a
61+
62+
echo "$cmp1 $cmp2 $cmp3\n";
63+
?>
64+
]]>
65+
</programlisting>
66+
&example.outputs;
67+
<screen>
68+
<![CDATA[
69+
1 -1 0
70+
]]>
71+
</screen>
72+
</example>
73+
</refsect1>
74+
75+
</refentry>
2676
<!-- Keep this comment at the end of the file
2777
Local variables:
2878
mode: sgml
@@ -42,4 +92,4 @@ End:
4292
vim600: syn=xml fen fdm=syntax fdl=2 si
4393
vim: et tw=78 syn=sgml
4494
vi: ts=1 sw=1
45-
-->
95+
-->
Lines changed: 63 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,66 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- splitted from ./it/functions/gmp.xml, last change in rev 1.1 -->
3-
<!-- last change to 'gmp-com' in en/ tree in rev 1.20 -->
4-
<!-- EN-Revision: n/a Maintainer: calandra Status: ready -->
5-
<!-- OLD-Revision: 1.25/EN.1.20 -->
6-
<refentry xml:id='function.gmp-com' xmlns="http://docbook.org/ns/docbook">
7-
<refnamediv>
8-
<refname>gmp_com</refname>
9-
<refpurpose>Calcola il complemento a uno di 'a'</refpurpose>
10-
</refnamediv>
11-
<refsect1>
12-
<title>Descrizione</title>
13-
<methodsynopsis>
14-
<type>resource</type><methodname>gmp_com</methodname>
15-
<methodparam><type>resource</type><parameter>a</parameter></methodparam>
16-
</methodsynopsis>
17-
<para>
18-
&warn.undocumented.func;
19-
</para>
20-
</refsect1>
21-
</refentry>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- EN-Revision: 039ab719e695141ee54409d26ad828337ec31d6e Maintainer: pastore Status: ready -->
3+
<!-- CREDITS: calandra -->
4+
<refentry xml:id="function.gmp-com" xmlns="http://docbook.org/ns/docbook">
5+
<refnamediv>
6+
<refname>gmp_com</refname>
7+
<refpurpose>Calcola il complemento a uno</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<type>GMP</type><methodname>gmp_com</methodname>
14+
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num</parameter></methodparam>
15+
</methodsynopsis>
16+
<para>
17+
Restituisce il complemento a uno di <parameter>num</parameter>.
18+
</para>
19+
</refsect1>
2220

21+
<refsect1 role="parameters">
22+
&reftitle.parameters;
23+
<para>
24+
<variablelist>
25+
<varlistentry>
26+
<term><parameter>num</parameter></term>
27+
<listitem>
28+
&gmp.parameter;
29+
</listitem>
30+
</varlistentry>
31+
</variablelist>
32+
</para>
33+
</refsect1>
34+
35+
<refsect1 role="returnvalues">
36+
&reftitle.returnvalues;
37+
<para>
38+
Restituisce il complemento a uno di <parameter>num</parameter>, come numero GMP.
39+
</para>
40+
</refsect1>
41+
42+
<refsect1 role="examples">
43+
&reftitle.examples;
44+
<example>
45+
<title>Esempio di <function>gmp_com</function></title>
46+
<programlisting role="php">
47+
<![CDATA[
48+
<?php
49+
$com = gmp_com("1234");
50+
echo gmp_strval($com) . "\n";
51+
?>
52+
]]>
53+
</programlisting>
54+
&example.outputs;
55+
<screen>
56+
<![CDATA[
57+
-1235
58+
]]>
59+
</screen>
60+
</example>
61+
</refsect1>
62+
63+
</refentry>
2364
<!-- Keep this comment at the end of the file
2465
Local variables:
2566
mode: sgml
@@ -39,4 +80,4 @@ End:
3980
vim600: syn=xml fen fdm=syntax fdl=2 si
4081
vim: et tw=78 syn=sgml
4182
vi: ts=1 sw=1
42-
-->
83+
-->

0 commit comments

Comments
 (0)