mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Some minor tweaks
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@38453 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
eb85974c01
commit
870331f5f3
2 changed files with 17 additions and 17 deletions
|
@ -4,7 +4,7 @@
|
|||
<partintro>
|
||||
<simpara>
|
||||
These functions allow you to work with arbitrary-length integers
|
||||
using GNU <acronym>MP</acronym> library. In order to have these
|
||||
using the GNU <acronym>MP</acronym> library. In order to have these
|
||||
functions available, you must compile PHP with
|
||||
<acronym>GMP</acronym> support by using the <option
|
||||
role="configure">--with-gmp</option> option.
|
||||
|
@ -25,13 +25,13 @@
|
|||
<para>
|
||||
Most GMP functions accept GMP number arguments, defined as
|
||||
<literal>resource</literal> below. However, most of these
|
||||
functions will accept also numeric and string arguments, given
|
||||
it's possible to convert the latter to number. Also, if there's
|
||||
faster function that can operate on integer arguments, it would
|
||||
be used instead of slower function when supplied arguments are
|
||||
functions will also accept numeric and string arguments, given
|
||||
that it is possible to convert the latter to a number. Also,
|
||||
if there is a faster function that can operate on integer arguments,
|
||||
it would be used instead of the slower function when the supplied arguments are
|
||||
integers. This is done transparently, so the bottom line is that
|
||||
you can use integers in every function that expects GMP
|
||||
number. See also <function>gmp_init</function> function.
|
||||
number. See also the <function>gmp_init</function> function.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
|
@ -71,7 +71,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Creates a GMP number from integer or string. String
|
||||
Creates a GMP number from an integer or string. String
|
||||
representation can be decimal or hexadecimal. In the latter case,
|
||||
the string should start with <literal>0x</literal>.
|
||||
</para>
|
||||
|
@ -116,7 +116,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
This function allows to convert GMP number to integer.
|
||||
<warning>
|
||||
<simpara>
|
||||
This function returns useful result only if the number actually
|
||||
This function returns a useful result only if the number actually
|
||||
fits the PHP integer (i.e., signed long type). If you want just
|
||||
to print the GMP number, use <function>gmp_strval</function>.
|
||||
</simpara>
|
||||
|
@ -148,7 +148,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Converting GMP number to string</title>
|
||||
<title>Converting a GMP number to a string</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
$a = gmp_init("0x41682179fbf5");
|
||||
|
@ -175,7 +175,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Add two GMP numbers. The result will be GMP number representing
|
||||
Add two GMP numbers. The result will be a GMP number representing
|
||||
the sum of the arguments.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -196,7 +196,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Subtract <parameter>b</parameter> from <parameter>a</parameter>
|
||||
Subtracts <parameter>b</parameter> from <parameter>a</parameter>
|
||||
and returns the result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -438,7 +438,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns positive value if <literal>a > b</literal>, zero if
|
||||
Returns a positive value if <literal>a > b</literal>, zero if
|
||||
<literal>a = b</literal> and negative value if <literal>a <
|
||||
b</literal>.
|
||||
</para>
|
||||
|
@ -578,7 +578,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns true if <parameter>a</parameter> is a prefect square,
|
||||
Returns true if <parameter>a</parameter> is a perfect square,
|
||||
false otherwise.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -679,7 +679,7 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
<para>
|
||||
Calculate greatest common divisor of <parameter>a</parameter> and
|
||||
<parameter>b</parameter>. The result is always positive even if
|
||||
either of or both input operands are negative.
|
||||
either of, or both, input operands are negative.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -700,8 +700,8 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</funcsynopsis>
|
||||
<para>
|
||||
Calculates g, s, and t, such that <literal>a*s + b*t = g =
|
||||
gcd(a,b)</literal>, where gcd is gretest common divisor. Returns
|
||||
array with respective elements g, s and t.
|
||||
gcd(a,b)</literal>, where gcd is the greatest common divisor. Returns
|
||||
an array with respective elements g, s and t.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -104,7 +104,7 @@ $a = 1.234; $a = 1.2e3;
|
|||
never compare floating point numbers for equality. If you really
|
||||
need higher precision, you should use the <link
|
||||
linkend="ref.bc">arbitrary precision math functions</link>
|
||||
instead.
|
||||
or <link linkend="ref.gmp">gmp</link> functions instead.
|
||||
</para>
|
||||
</warning>
|
||||
</sect1>
|
||||
|
|
Loading…
Reference in a new issue