mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
whitespace
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@233013 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f9a3f7a9b0
commit
68f6b97171
48 changed files with 1583 additions and 1583 deletions
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.abs">
|
||||
<refnamediv>
|
||||
<refname>abs</refname>
|
||||
<refpurpose>Absolute value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>abs</methodname>
|
||||
<methodparam><type>mixed</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the absolute value of <parameter>number</parameter>. If the
|
||||
argument <parameter>number</parameter> is
|
||||
of type <type>float</type>, the return type is also <type>float</type>,
|
||||
otherwise it is <type>integer</type> (as <type>float</type> usually has a
|
||||
bigger value range than <type>integer</type>).
|
||||
</para>
|
||||
<example>
|
||||
<title><function>abs</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.abs">
|
||||
<refnamediv>
|
||||
<refname>abs</refname>
|
||||
<refpurpose>Absolute value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>abs</methodname>
|
||||
<methodparam><type>mixed</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the absolute value of <parameter>number</parameter>. If the
|
||||
argument <parameter>number</parameter> is
|
||||
of type <type>float</type>, the return type is also <type>float</type>,
|
||||
otherwise it is <type>integer</type> (as <type>float</type> usually has a
|
||||
bigger value range than <type>integer</type>).
|
||||
</para>
|
||||
<example>
|
||||
<title><function>abs</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$abs = abs(-4.2); // $abs = 4.2; (double/float)
|
||||
|
@ -29,10 +29,10 @@ $abs2 = abs(5); // $abs2 = 5; (integer)
|
|||
$abs3 = abs(-5); // $abs3 = 5; (integer)
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.57 -->
|
||||
<refentry id="function.acos">
|
||||
<refnamediv>
|
||||
<refname>acos</refname>
|
||||
<refpurpose>Arc cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>acos</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the arc cosine of <parameter>arg</parameter> in radians.
|
||||
<function>acos</function> is the complementary function of
|
||||
<function>cos</function>, which means that
|
||||
<literal>a==cos(acos(a))</literal> for every value of a that is within
|
||||
<function>acos</function>' range.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>acosh</function>,
|
||||
<function>asin</function>, and
|
||||
<function>atan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.acos">
|
||||
<refnamediv>
|
||||
<refname>acos</refname>
|
||||
<refpurpose>Arc cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>acos</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the arc cosine of <parameter>arg</parameter> in radians.
|
||||
<function>acos</function> is the complementary function of
|
||||
<function>cos</function>, which means that
|
||||
<literal>a==cos(acos(a))</literal> for every value of a that is within
|
||||
<function>acos</function>' range.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>acosh</function>,
|
||||
<function>asin</function>, and
|
||||
<function>atan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.acosh">
|
||||
<refnamediv>
|
||||
<refname>acosh</refname>
|
||||
<refpurpose>Inverse hyperbolic cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>acosh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the inverse hyperbolic cosine of
|
||||
<parameter>arg</parameter>, i.e. the value whose
|
||||
hyperbolic cosine is <parameter>arg</parameter>.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also:
|
||||
<function>acos</function>,
|
||||
<function>asinh</function>, and
|
||||
<function>atanh</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.acosh">
|
||||
<refnamediv>
|
||||
<refname>acosh</refname>
|
||||
<refpurpose>Inverse hyperbolic cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>acosh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the inverse hyperbolic cosine of
|
||||
<parameter>arg</parameter>, i.e. the value whose
|
||||
hyperbolic cosine is <parameter>arg</parameter>.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also:
|
||||
<function>acos</function>,
|
||||
<function>asinh</function>, and
|
||||
<function>atanh</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.57 -->
|
||||
<refentry id="function.asin">
|
||||
<refnamediv>
|
||||
<refname>asin</refname>
|
||||
<refpurpose>Arc sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>asin</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the arc sine of <parameter>arg</parameter> in radians.
|
||||
<function>asin</function> is the complementary function of
|
||||
<function>sin</function>, which means that
|
||||
<literal>a==sin(asin(a))</literal> for every value of a that is within
|
||||
<function>asin</function>'s range.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>asinh</function>,
|
||||
<function>acos</function>, and
|
||||
<function>atan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.asin">
|
||||
<refnamediv>
|
||||
<refname>asin</refname>
|
||||
<refpurpose>Arc sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>asin</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the arc sine of <parameter>arg</parameter> in radians.
|
||||
<function>asin</function> is the complementary function of
|
||||
<function>sin</function>, which means that
|
||||
<literal>a==sin(asin(a))</literal> for every value of a that is within
|
||||
<function>asin</function>'s range.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>asinh</function>,
|
||||
<function>acos</function>, and
|
||||
<function>atan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.asinh">
|
||||
<refnamediv>
|
||||
<refname>asinh</refname>
|
||||
<refpurpose>Inverse hyperbolic sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>asinh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the inverse hyperbolic sine of
|
||||
<parameter>arg</parameter>, i.e. the value whose
|
||||
hyperbolic sine is <parameter>arg</parameter>.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also:
|
||||
<function>asin</function>,
|
||||
<function>acosh</function>, and
|
||||
<function>atanh</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.asinh">
|
||||
<refnamediv>
|
||||
<refname>asinh</refname>
|
||||
<refpurpose>Inverse hyperbolic sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>asinh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the inverse hyperbolic sine of
|
||||
<parameter>arg</parameter>, i.e. the value whose
|
||||
hyperbolic sine is <parameter>arg</parameter>.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also:
|
||||
<function>asin</function>,
|
||||
<function>acosh</function>, and
|
||||
<function>atanh</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.57 -->
|
||||
<refentry id="function.atan">
|
||||
<refnamediv>
|
||||
<refname>atan</refname>
|
||||
<refpurpose>Arc tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>atan</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the arc tangent of <parameter>arg</parameter> in radians.
|
||||
<function>atan</function> is the complementary function of
|
||||
<function>tan</function>, which means that
|
||||
<literal>a==tan(atan(a))</literal> for every value of a that is within
|
||||
<function>atan</function>'s range.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>atanh</function>,
|
||||
<function>asin</function>, and
|
||||
<function>acos</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.atan">
|
||||
<refnamediv>
|
||||
<refname>atan</refname>
|
||||
<refpurpose>Arc tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>atan</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the arc tangent of <parameter>arg</parameter> in radians.
|
||||
<function>atan</function> is the complementary function of
|
||||
<function>tan</function>, which means that
|
||||
<literal>a==tan(atan(a))</literal> for every value of a that is within
|
||||
<function>atan</function>'s range.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>atanh</function>,
|
||||
<function>asin</function>, and
|
||||
<function>acos</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.atan2">
|
||||
<refnamediv>
|
||||
<refname>atan2</refname>
|
||||
<refpurpose>Arc tangent of two variables</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>atan2</methodname>
|
||||
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
This function calculates the arc tangent of the two variables
|
||||
<parameter>x</parameter> and <parameter>y</parameter>. It is
|
||||
similar to calculating the arc tangent of
|
||||
<parameter>y</parameter> / <parameter>x</parameter>, except that
|
||||
the signs of both arguments are used to determine the quadrant of
|
||||
the result.
|
||||
</simpara>
|
||||
<simpara>
|
||||
The function returns the result in radians, which is between -PI
|
||||
and PI (inclusive).
|
||||
</simpara>
|
||||
<para>
|
||||
See also <function>acos</function> and <function>atan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.atan2">
|
||||
<refnamediv>
|
||||
<refname>atan2</refname>
|
||||
<refpurpose>Arc tangent of two variables</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>atan2</methodname>
|
||||
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
This function calculates the arc tangent of the two variables
|
||||
<parameter>x</parameter> and <parameter>y</parameter>. It is
|
||||
similar to calculating the arc tangent of
|
||||
<parameter>y</parameter> / <parameter>x</parameter>, except that
|
||||
the signs of both arguments are used to determine the quadrant of
|
||||
the result.
|
||||
</simpara>
|
||||
<simpara>
|
||||
The function returns the result in radians, which is between -PI
|
||||
and PI (inclusive).
|
||||
</simpara>
|
||||
<para>
|
||||
See also <function>acos</function> and <function>atan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.atanh">
|
||||
<refnamediv>
|
||||
<refname>atanh</refname>
|
||||
<refpurpose>Inverse hyperbolic tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>atanh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the inverse hyperbolic tangent of
|
||||
<parameter>arg</parameter>, i.e. the value whose
|
||||
hyperbolic tangent is <parameter>arg</parameter>.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also:
|
||||
<function>atan</function>,
|
||||
<function>asinh</function>, and
|
||||
<function>acosh</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.atanh">
|
||||
<refnamediv>
|
||||
<refname>atanh</refname>
|
||||
<refpurpose>Inverse hyperbolic tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>atanh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the inverse hyperbolic tangent of
|
||||
<parameter>arg</parameter>, i.e. the value whose
|
||||
hyperbolic tangent is <parameter>arg</parameter>.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also:
|
||||
<function>atan</function>,
|
||||
<function>asinh</function>, and
|
||||
<function>acosh</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,61 +1,61 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.base-convert">
|
||||
<refnamediv>
|
||||
<refname>base_convert</refname>
|
||||
<refpurpose>Convert a number between arbitrary bases</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>base_convert</methodname>
|
||||
<methodparam><type>string</type><parameter>number</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>frombase</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>tobase</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing <parameter>number</parameter>
|
||||
represented in base <parameter>tobase</parameter>. The base in
|
||||
which <parameter>number</parameter> is given is specified in
|
||||
<parameter>frombase</parameter>. Both
|
||||
<parameter>frombase</parameter> and <parameter>tobase</parameter>
|
||||
have to be between 2 and 36, inclusive. Digits in numbers with a
|
||||
base higher than 10 will be represented with the letters a-z,
|
||||
with a meaning 10, b meaning 11 and z meaning 35.
|
||||
<example>
|
||||
<title><function>base_convert</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.base-convert">
|
||||
<refnamediv>
|
||||
<refname>base_convert</refname>
|
||||
<refpurpose>Convert a number between arbitrary bases</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>base_convert</methodname>
|
||||
<methodparam><type>string</type><parameter>number</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>frombase</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>tobase</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing <parameter>number</parameter>
|
||||
represented in base <parameter>tobase</parameter>. The base in
|
||||
which <parameter>number</parameter> is given is specified in
|
||||
<parameter>frombase</parameter>. Both
|
||||
<parameter>frombase</parameter> and <parameter>tobase</parameter>
|
||||
have to be between 2 and 36, inclusive. Digits in numbers with a
|
||||
base higher than 10 will be represented with the letters a-z,
|
||||
with a meaning 10, b meaning 11 and z meaning 35.
|
||||
<example>
|
||||
<title><function>base_convert</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$hexadecimal = 'A37334';
|
||||
echo base_convert($hexadecimal, 16, 2);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Outputs:
|
||||
</para>
|
||||
<screen>
|
||||
</programlisting>
|
||||
<para>
|
||||
Outputs:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
101000110111001100110100
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
<function>base_convert</function> may lose precision on large numbers
|
||||
due to properties related to the internal "double" or "float" type used.
|
||||
Please see the <link linkend="language.types.float">Floating point numbers</link>
|
||||
section in the manual for more specific information and limitations.
|
||||
</simpara>
|
||||
</warning>
|
||||
<para>
|
||||
See also: <function>intval</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
<function>base_convert</function> may lose precision on large numbers
|
||||
due to properties related to the internal "double" or "float" type used.
|
||||
Please see the <link linkend="language.types.float">Floating point numbers</link>
|
||||
section in the manual for more specific information and limitations.
|
||||
</simpara>
|
||||
</warning>
|
||||
<para>
|
||||
See also: <function>intval</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.bindec">
|
||||
<refnamediv>
|
||||
<refname>bindec</refname>
|
||||
<refpurpose>Binary to decimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>bindec</methodname>
|
||||
<methodparam><type>string</type><parameter>binary_string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the decimal equivalent of the binary number represented by
|
||||
the <parameter>binary_string</parameter> argument.
|
||||
</para>
|
||||
<para>
|
||||
<function>bindec</function> converts a binary number to an
|
||||
<type>integer</type>. The largest number that can be converted is
|
||||
31 bits of 1's or 2147483647 in decimal.
|
||||
As of PHP 4.1.0, this function can also convert larger numbers. It returns
|
||||
<type>float</type> in that case.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>bindec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.bindec">
|
||||
<refnamediv>
|
||||
<refname>bindec</refname>
|
||||
<refpurpose>Binary to decimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>bindec</methodname>
|
||||
<methodparam><type>string</type><parameter>binary_string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the decimal equivalent of the binary number represented by
|
||||
the <parameter>binary_string</parameter> argument.
|
||||
</para>
|
||||
<para>
|
||||
<function>bindec</function> converts a binary number to an
|
||||
<type>integer</type>. The largest number that can be converted is
|
||||
31 bits of 1's or 2147483647 in decimal.
|
||||
As of PHP 4.1.0, this function can also convert larger numbers. It returns
|
||||
<type>float</type> in that case.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>bindec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo bindec('110011') . "\n";
|
||||
|
@ -35,25 +35,25 @@ echo bindec('000110011') . "\n";
|
|||
echo bindec('111');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
51
|
||||
51
|
||||
7
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>decbin</function>,
|
||||
<function>octdec</function>,
|
||||
<function>hexdec</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>decbin</function>,
|
||||
<function>octdec</function>,
|
||||
<function>hexdec</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.ceil">
|
||||
<refnamediv>
|
||||
<refname>ceil</refname>
|
||||
<refpurpose>Round fractions up</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>ceil</methodname>
|
||||
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the next highest integer value by rounding up
|
||||
<parameter>value</parameter> if necessary.
|
||||
The return value of <function>ceil</function> is still of type
|
||||
<type>float</type> as the value range of <type>float</type> is
|
||||
usually bigger than that of <type>integer</type>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ceil</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.ceil">
|
||||
<refnamediv>
|
||||
<refname>ceil</refname>
|
||||
<refpurpose>Round fractions up</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>ceil</methodname>
|
||||
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the next highest integer value by rounding up
|
||||
<parameter>value</parameter> if necessary.
|
||||
The return value of <function>ceil</function> is still of type
|
||||
<type>float</type> as the value range of <type>float</type> is
|
||||
usually bigger than that of <type>integer</type>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>ceil</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo ceil(4.3); // 5
|
||||
|
@ -30,15 +30,15 @@ echo ceil(9.999); // 10
|
|||
echo ceil(-3.14); // -3
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>floor</function> and
|
||||
<function>round</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>floor</function> and
|
||||
<function>round</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.cos">
|
||||
<refnamediv>
|
||||
<refname>cos</refname>
|
||||
<refpurpose>Cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>cos</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>cos</function> returns the cosine of the <parameter>arg</parameter>
|
||||
parameter. The <parameter>arg</parameter> parameter is in radians.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>cos</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.cos">
|
||||
<refnamediv>
|
||||
<refname>cos</refname>
|
||||
<refpurpose>Cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>cos</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>cos</function> returns the cosine of the <parameter>arg</parameter>
|
||||
parameter. The <parameter>arg</parameter> parameter is in radians.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>cos</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -27,18 +27,18 @@ echo cos(M_PI); // -1
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>acos</function>,
|
||||
<function>sin</function>,
|
||||
<function>tan</function>, and
|
||||
<function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>acos</function>,
|
||||
<function>sin</function>,
|
||||
<function>tan</function>, and
|
||||
<function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.57 -->
|
||||
<refentry id="function.cosh">
|
||||
<refnamediv>
|
||||
<refname>cosh</refname>
|
||||
<refpurpose>Hyperbolic cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>cosh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hyperbolic cosine of <parameter>arg</parameter>,
|
||||
defined as <literal>(exp(arg) + exp(-arg))/2</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>cos</function>,
|
||||
<function>acosh</function>,
|
||||
<function>sin</function>, and
|
||||
<function>tan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.cosh">
|
||||
<refnamediv>
|
||||
<refname>cosh</refname>
|
||||
<refpurpose>Hyperbolic cosine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>cosh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hyperbolic cosine of <parameter>arg</parameter>,
|
||||
defined as <literal>(exp(arg) + exp(-arg))/2</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>cos</function>,
|
||||
<function>acosh</function>,
|
||||
<function>sin</function>, and
|
||||
<function>tan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.decbin">
|
||||
<refnamediv>
|
||||
<refname>decbin</refname>
|
||||
<refpurpose>Decimal to binary</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>decbin</methodname>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing a binary representation of the given
|
||||
<parameter>number</parameter> argument. The largest number that can be converted is
|
||||
4294967295 in decimal resulting to a string of 32 1's.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>decbin</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.decbin">
|
||||
<refnamediv>
|
||||
<refname>decbin</refname>
|
||||
<refpurpose>Decimal to binary</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>decbin</methodname>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing a binary representation of the given
|
||||
<parameter>number</parameter> argument. The largest number that can be converted is
|
||||
4294967295 in decimal resulting to a string of 32 1's.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>decbin</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo decbin(12) . "\n";
|
||||
echo decbin(26);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1100
|
||||
11010
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>bindec</function>,
|
||||
<function>decoct</function>,
|
||||
<function>dechex</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>bindec</function>,
|
||||
<function>decoct</function>,
|
||||
<function>dechex</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.dechex">
|
||||
<refnamediv>
|
||||
<refname>dechex</refname>
|
||||
<refpurpose>Decimal to hexadecimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>dechex</methodname>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing a hexadecimal representation of the
|
||||
given <parameter>number</parameter> argument. The largest number that can
|
||||
be converted is 4294967295 in decimal resulting to "ffffffff".
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>dechex</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.dechex">
|
||||
<refnamediv>
|
||||
<refname>dechex</refname>
|
||||
<refpurpose>Decimal to hexadecimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>dechex</methodname>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing a hexadecimal representation of the
|
||||
given <parameter>number</parameter> argument. The largest number that can
|
||||
be converted is 4294967295 in decimal resulting to "ffffffff".
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>dechex</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo dechex(10) . "\n";
|
||||
echo dechex(47);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
a
|
||||
2f
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>hexdec</function>,
|
||||
<function>decbin</function>,
|
||||
<function>decoct</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>hexdec</function>,
|
||||
<function>decbin</function>,
|
||||
<function>decoct</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.8 -->
|
||||
<refentry id="function.decoct">
|
||||
<refnamediv>
|
||||
<refname>decoct</refname>
|
||||
<refpurpose>Decimal to octal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>decoct</methodname>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing an octal representation of the given
|
||||
<parameter>number</parameter> argument. The largest number that can be converted is
|
||||
4294967295 in decimal resulting to "37777777777".
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>decoct</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.decoct">
|
||||
<refnamediv>
|
||||
<refname>decoct</refname>
|
||||
<refpurpose>Decimal to octal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>decoct</methodname>
|
||||
<methodparam><type>int</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string containing an octal representation of the given
|
||||
<parameter>number</parameter> argument. The largest number that can be converted is
|
||||
4294967295 in decimal resulting to "37777777777".
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>decoct</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo decoct(15) . "\n";
|
||||
echo decoct(264);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
17
|
||||
410
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>octdec</function>,
|
||||
<function>decbin</function>,
|
||||
<function>dechex</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>octdec</function>,
|
||||
<function>decbin</function>,
|
||||
<function>dechex</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.deg2rad">
|
||||
<refnamediv>
|
||||
<refname>deg2rad</refname>
|
||||
<refpurpose>
|
||||
Converts the number in degrees to the radian equivalent
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>deg2rad</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function converts <parameter>number</parameter> from degrees
|
||||
to the radian equivalent.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>deg2rad</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.deg2rad">
|
||||
<refnamediv>
|
||||
<refname>deg2rad</refname>
|
||||
<refpurpose>
|
||||
Converts the number in degrees to the radian equivalent
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>deg2rad</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function converts <parameter>number</parameter> from degrees
|
||||
to the radian equivalent.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>deg2rad</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -30,14 +30,14 @@ var_dump(deg2rad(45) === M_PI_4); // bool(true)
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>rad2deg</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>rad2deg</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.exp">
|
||||
<refnamediv>
|
||||
<refname>exp</refname>
|
||||
<refpurpose>Calculates the exponent of <constant>e</constant></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>exp</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <constant>e</constant> raised to the power of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
'e' is the base of the natural system of logarithms, or approximately
|
||||
2.718282.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>exp</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.exp">
|
||||
<refnamediv>
|
||||
<refname>exp</refname>
|
||||
<refpurpose>Calculates the exponent of <constant>e</constant></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>exp</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <constant>e</constant> raised to the power of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
'e' is the base of the natural system of logarithms, or approximately
|
||||
2.718282.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>exp</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo exp(12) . "\n";
|
||||
echo exp(5.7);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1.6275E+005
|
||||
298.87
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>log</function> and
|
||||
<function>pow</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also
|
||||
<function>log</function> and
|
||||
<function>pow</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.63 -->
|
||||
<refentry id='function.expm1'>
|
||||
<refnamediv>
|
||||
<refname>expm1</refname>
|
||||
<refpurpose>
|
||||
Returns exp(number) - 1, computed in a way that is accurate even
|
||||
when the value of number is close to zero
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>expm1</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>expm1</function> returns the equivalent to
|
||||
'exp(<parameter>number</parameter>) - 1' computed in a way that is
|
||||
accurate even if the value of <parameter>number</parameter> is near zero,
|
||||
a case where 'exp (<parameter>number</parameter>) - 1' would be
|
||||
inaccurate due to subtraction of two numbers that are nearly equal.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also <function>log1p</function> and
|
||||
<function>exp</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id='function.expm1'>
|
||||
<refnamediv>
|
||||
<refname>expm1</refname>
|
||||
<refpurpose>
|
||||
Returns exp(number) - 1, computed in a way that is accurate even
|
||||
when the value of number is close to zero
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>expm1</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>expm1</function> returns the equivalent to
|
||||
'exp(<parameter>number</parameter>) - 1' computed in a way that is
|
||||
accurate even if the value of <parameter>number</parameter> is near zero,
|
||||
a case where 'exp (<parameter>number</parameter>) - 1' would be
|
||||
inaccurate due to subtraction of two numbers that are nearly equal.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also <function>log1p</function> and
|
||||
<function>exp</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.floor">
|
||||
<refnamediv>
|
||||
<refname>floor</refname>
|
||||
<refpurpose>Round fractions down</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>floor</methodname>
|
||||
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the next lowest integer value by rounding down
|
||||
<parameter>value</parameter> if necessary.
|
||||
The return value of <function>floor</function> is still of type
|
||||
<type>float</type> because the value range of <type>float</type> is
|
||||
usually bigger than that of <type>integer</type>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>floor</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.floor">
|
||||
<refnamediv>
|
||||
<refname>floor</refname>
|
||||
<refpurpose>Round fractions down</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>floor</methodname>
|
||||
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the next lowest integer value by rounding down
|
||||
<parameter>value</parameter> if necessary.
|
||||
The return value of <function>floor</function> is still of type
|
||||
<type>float</type> because the value range of <type>float</type> is
|
||||
usually bigger than that of <type>integer</type>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>floor</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo floor(4.3); // 4
|
||||
|
@ -30,15 +30,15 @@ echo floor(9.999); // 9
|
|||
echo floor(-3.14); // -4
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>ceil</function> and
|
||||
<function>round</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>ceil</function> and
|
||||
<function>round</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.fmod">
|
||||
<refnamediv>
|
||||
<refname>fmod</refname>
|
||||
<refpurpose>Returns the floating point remainder (modulo) of the division
|
||||
of the arguments</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>fmod</methodname>
|
||||
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the floating point remainder of dividing the dividend
|
||||
(<parameter>x</parameter>) by the divisor (<parameter>y</parameter>).
|
||||
The reminder (<varname>r</varname>) is defined as: x = i * y + r, for
|
||||
some integer <varname>i</varname>. If <parameter>y</parameter> is
|
||||
non-zero, <varname>r</varname> has the same sign as
|
||||
<parameter>x</parameter> and a magnitude less than the magnitude of
|
||||
<parameter>y</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using <function>fmod</function></title>
|
||||
<programlisting role="php">
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.fmod">
|
||||
<refnamediv>
|
||||
<refname>fmod</refname>
|
||||
<refpurpose>Returns the floating point remainder (modulo) of the division
|
||||
of the arguments</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>fmod</methodname>
|
||||
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the floating point remainder of dividing the dividend
|
||||
(<parameter>x</parameter>) by the divisor (<parameter>y</parameter>).
|
||||
The reminder (<varname>r</varname>) is defined as: x = i * y + r, for
|
||||
some integer <varname>i</varname>. If <parameter>y</parameter> is
|
||||
non-zero, <varname>r</varname> has the same sign as
|
||||
<parameter>x</parameter> and a magnitude less than the magnitude of
|
||||
<parameter>y</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using <function>fmod</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$x = 5.7;
|
||||
|
@ -34,11 +34,11 @@ $r = fmod($x, $y);
|
|||
// $r equals 0.5, because 4 * 1.3 + 0.5 = 5.7
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.getrandmax">
|
||||
<refnamediv>
|
||||
<refname>getrandmax</refname>
|
||||
<refpurpose>Show largest possible random value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>getrandmax</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the maximum value that can be returned by a call to
|
||||
<function>rand</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>rand</function>, <function>srand</function>
|
||||
and <function>mt_getrandmax</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.getrandmax">
|
||||
<refnamediv>
|
||||
<refname>getrandmax</refname>
|
||||
<refpurpose>Show largest possible random value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>getrandmax</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the maximum value that can be returned by a call to
|
||||
<function>rand</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also <function>rand</function>, <function>srand</function>
|
||||
and <function>mt_getrandmax</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.16 -->
|
||||
<refentry id="function.hexdec">
|
||||
<refnamediv>
|
||||
<refname>hexdec</refname>
|
||||
<refpurpose>Hexadecimal to decimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>hexdec</methodname>
|
||||
<methodparam><type>string</type><parameter>hex_string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the decimal equivalent of the hexadecimal number
|
||||
represented by the <parameter>hex_string</parameter> argument.
|
||||
<function>hexdec</function> converts a hexadecimal string to a
|
||||
decimal number. The largest number that can be converted is
|
||||
7fffffff or 2147483647 in decimal.
|
||||
As of PHP 4.1.0, this function can also convert larger numbers. It returns
|
||||
<type>float</type> in that case.
|
||||
</para>
|
||||
<para>
|
||||
<function>hexdec</function> will ignore any non-hexadecimal
|
||||
characters it encounters.
|
||||
<example>
|
||||
<title><function>hexdec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.hexdec">
|
||||
<refnamediv>
|
||||
<refname>hexdec</refname>
|
||||
<refpurpose>Hexadecimal to decimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>hexdec</methodname>
|
||||
<methodparam><type>string</type><parameter>hex_string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the decimal equivalent of the hexadecimal number
|
||||
represented by the <parameter>hex_string</parameter> argument.
|
||||
<function>hexdec</function> converts a hexadecimal string to a
|
||||
decimal number. The largest number that can be converted is
|
||||
7fffffff or 2147483647 in decimal.
|
||||
As of PHP 4.1.0, this function can also convert larger numbers. It returns
|
||||
<type>float</type> in that case.
|
||||
</para>
|
||||
<para>
|
||||
<function>hexdec</function> will ignore any non-hexadecimal
|
||||
characters it encounters.
|
||||
<example>
|
||||
<title><function>hexdec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
var_dump(hexdec("See"));
|
||||
|
@ -37,17 +37,17 @@ var_dump(hexdec("that")); // print "int(10)"
|
|||
var_dump(hexdec("a0")); // print "int(160)"
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>dechex</function>,
|
||||
<function>bindec</function>,
|
||||
<function>octdec</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>dechex</function>,
|
||||
<function>bindec</function>,
|
||||
<function>octdec</function> and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.72 -->
|
||||
<refentry id='function.hypot'>
|
||||
<refnamediv>
|
||||
<refname>hypot</refname>
|
||||
<refpurpose>
|
||||
Calculate the length of the hypotenuse of a right-angle triangle
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>hypot</methodname>
|
||||
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>hypot</function> returns the length of the hypotenuse of a
|
||||
right-angle triangle with sides of length <parameter>x</parameter> and
|
||||
<parameter>y</parameter>, or the distance of the point
|
||||
(<parameter>x</parameter>, <parameter>y</parameter>) from the origin.
|
||||
This is equivalent to <literal>sqrt(x*x + y*y)</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id='function.hypot'>
|
||||
<refnamediv>
|
||||
<refname>hypot</refname>
|
||||
<refpurpose>
|
||||
Calculate the length of the hypotenuse of a right-angle triangle
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>hypot</methodname>
|
||||
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>hypot</function> returns the length of the hypotenuse of a
|
||||
right-angle triangle with sides of length <parameter>x</parameter> and
|
||||
<parameter>y</parameter>, or the distance of the point
|
||||
(<parameter>x</parameter>, <parameter>y</parameter>) from the origin.
|
||||
This is equivalent to <literal>sqrt(x*x + y*y)</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.72 -->
|
||||
<refentry id='function.is-finite'>
|
||||
<refnamediv>
|
||||
<refname>is_finite</refname>
|
||||
<refpurpose>Finds whether a value is a legal finite number</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_finite</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns &true; if <parameter>val</parameter> is a legal finite
|
||||
number within the allowed range for a PHP float on this platform.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_infinite</function> and
|
||||
<function>is_nan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id='function.is-finite'>
|
||||
<refnamediv>
|
||||
<refname>is_finite</refname>
|
||||
<refpurpose>Finds whether a value is a legal finite number</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_finite</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns &true; if <parameter>val</parameter> is a legal finite
|
||||
number within the allowed range for a PHP float on this platform.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_infinite</function> and
|
||||
<function>is_nan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.72 -->
|
||||
<refentry id='function.is-infinite'>
|
||||
<refnamediv>
|
||||
<refname>is_infinite</refname>
|
||||
<refpurpose>Finds whether a value is infinite</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_infinite</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns &true; if <parameter>val</parameter> is infinite (positive or
|
||||
negative), like the result of <literal>log(0)</literal> or any value too
|
||||
big to fit into a float on this platform.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_finite</function> and
|
||||
<function>is_nan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id='function.is-infinite'>
|
||||
<refnamediv>
|
||||
<refname>is_infinite</refname>
|
||||
<refpurpose>Finds whether a value is infinite</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_infinite</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns &true; if <parameter>val</parameter> is infinite (positive or
|
||||
negative), like the result of <literal>log(0)</literal> or any value too
|
||||
big to fit into a float on this platform.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_finite</function> and
|
||||
<function>is_nan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.63 -->
|
||||
<refentry id='function.is-nan'>
|
||||
<refnamediv>
|
||||
<refname>is_nan</refname>
|
||||
<refpurpose>Finds whether a value is not a number</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_nan</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns &true; if <parameter>val</parameter> is 'not a number',
|
||||
like the result of <literal>acos(1.01)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_finite</function> and
|
||||
<function>is_infinite</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id='function.is-nan'>
|
||||
<refnamediv>
|
||||
<refname>is_nan</refname>
|
||||
<refpurpose>Finds whether a value is not a number</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>is_nan</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns &true; if <parameter>val</parameter> is 'not a number',
|
||||
like the result of <literal>acos(1.01)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_finite</function> and
|
||||
<function>is_infinite</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.lcg-value">
|
||||
<refnamediv>
|
||||
<refname>lcg_value</refname>
|
||||
<refpurpose>Combined linear congruential generator</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>lcg_value</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>lcg_value</function> returns a pseudo random number in
|
||||
the range of (0, 1). The function combines two CGs with periods
|
||||
of 2^31 - 85 and 2^31 - 249. The period of this function is equal
|
||||
to the product of both primes.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.lcg-value">
|
||||
<refnamediv>
|
||||
<refname>lcg_value</refname>
|
||||
<refpurpose>Combined linear congruential generator</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>lcg_value</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>lcg_value</function> returns a pseudo random number in
|
||||
the range of (0, 1). The function combines two CGs with periods
|
||||
of 2^31 - 85 and 2^31 - 249. The period of this function is equal
|
||||
to the product of both primes.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.log">
|
||||
<refnamediv>
|
||||
<refname>log</refname>
|
||||
<refpurpose>Natural logarithm</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>log</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>float</type><parameter>base</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
If the optional <parameter>base</parameter> parameter is specified,
|
||||
<function>log</function> returns log<subscript>base</subscript>
|
||||
<parameter>arg</parameter>, otherwise <function>log</function>
|
||||
returns the natural logarithm of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>base</parameter> parameter became available
|
||||
with PHP 4.3.0.
|
||||
</para>
|
||||
<para>
|
||||
As always you can calculate the logarithm in base <literal>b</literal>
|
||||
of a number <literal>n</literal>, but using the mathematical identity:
|
||||
log<subscript>b</subscript>(n) = log(n)/log(b), where log is the
|
||||
neperian (or natural) logarithm.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>exp</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.log">
|
||||
<refnamediv>
|
||||
<refname>log</refname>
|
||||
<refpurpose>Natural logarithm</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>log</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>float</type><parameter>base</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
If the optional <parameter>base</parameter> parameter is specified,
|
||||
<function>log</function> returns log<subscript>base</subscript>
|
||||
<parameter>arg</parameter>, otherwise <function>log</function>
|
||||
returns the natural logarithm of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>base</parameter> parameter became available
|
||||
with PHP 4.3.0.
|
||||
</para>
|
||||
<para>
|
||||
As always you can calculate the logarithm in base <literal>b</literal>
|
||||
of a number <literal>n</literal>, but using the mathematical identity:
|
||||
log<subscript>b</subscript>(n) = log(n)/log(b), where log is the
|
||||
neperian (or natural) logarithm.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>exp</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.log10">
|
||||
<refnamediv>
|
||||
<refname>log10</refname>
|
||||
<refpurpose>Base-10 logarithm</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>log10</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the base-10 logarithm of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<simpara>
|
||||
See Also:
|
||||
<function>log</function>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.log10">
|
||||
<refnamediv>
|
||||
<refname>log10</refname>
|
||||
<refpurpose>Base-10 logarithm</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>log10</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the base-10 logarithm of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<simpara>
|
||||
See Also:
|
||||
<function>log</function>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.63 -->
|
||||
<refentry id='function.log1p'>
|
||||
<refnamediv>
|
||||
<refname>log1p</refname>
|
||||
<refpurpose>
|
||||
Returns log(1 + number), computed in a way that is accurate even when
|
||||
the value of number is close to zero
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>log1p</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>log1p</function> returns log(1 +
|
||||
<parameter>number</parameter>) computed in a way that is accurante even
|
||||
when the value of <parameter>number</parameter> is close to zero.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also <function>expm1</function> and
|
||||
<function>log</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id='function.log1p'>
|
||||
<refnamediv>
|
||||
<refname>log1p</refname>
|
||||
<refpurpose>
|
||||
Returns log(1 + number), computed in a way that is accurate even when
|
||||
the value of number is close to zero
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>log1p</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
<function>log1p</function> returns log(1 +
|
||||
<parameter>number</parameter>) computed in a way that is accurante even
|
||||
when the value of <parameter>number</parameter> is close to zero.
|
||||
</para>
|
||||
¬e.no-windows;
|
||||
<para>
|
||||
See also <function>expm1</function> and
|
||||
<function>log</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.max">
|
||||
<refnamediv>
|
||||
<refname>max</refname>
|
||||
<refpurpose>Find highest value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>max</methodname>
|
||||
<methodparam><type>number</type><parameter>arg1</parameter></methodparam>
|
||||
<methodparam><type>number</type><parameter>arg2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>number</type><parameter>...</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>max</methodname>
|
||||
<methodparam><type>array</type><parameter>numbers</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>max</function> returns the numerically highest of the
|
||||
parameter values.
|
||||
</para>
|
||||
<para>
|
||||
If the first and only parameter is an array, <function>max</function>
|
||||
returns the highest value in that array. If the first parameter
|
||||
is an integer, string or float, you need at least two parameters
|
||||
and <function>max</function> returns the biggest of these values.
|
||||
You can compare an unlimited number of values.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
PHP will evaluate a non-numeric <type>string</type> as
|
||||
<literal>0</literal>, but still return the string if it's seen as the
|
||||
numerically highest value. If multiple arguments evaluate to
|
||||
<literal>0</literal>, <function>max</function> will return a numeric
|
||||
<literal>0</literal> if given, else the alphabetical highest string
|
||||
value will be returned.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title>Example uses of <function>max</function></title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.max">
|
||||
<refnamediv>
|
||||
<refname>max</refname>
|
||||
<refpurpose>Find highest value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>max</methodname>
|
||||
<methodparam><type>number</type><parameter>arg1</parameter></methodparam>
|
||||
<methodparam><type>number</type><parameter>arg2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>number</type><parameter>...</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>max</methodname>
|
||||
<methodparam><type>array</type><parameter>numbers</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>max</function> returns the numerically highest of the
|
||||
parameter values.
|
||||
</para>
|
||||
<para>
|
||||
If the first and only parameter is an array, <function>max</function>
|
||||
returns the highest value in that array. If the first parameter
|
||||
is an integer, string or float, you need at least two parameters
|
||||
and <function>max</function> returns the biggest of these values.
|
||||
You can compare an unlimited number of values.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
PHP will evaluate a non-numeric <type>string</type> as
|
||||
<literal>0</literal>, but still return the string if it's seen as the
|
||||
numerically highest value. If multiple arguments evaluate to
|
||||
<literal>0</literal>, <function>max</function> will return a numeric
|
||||
<literal>0</literal> if given, else the alphabetical highest string
|
||||
value will be returned.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title>Example uses of <function>max</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo max(1, 3, 5, 6, 7); // 7
|
||||
|
@ -61,15 +61,15 @@ $val = max(array(2, 4, 8), array(2, 5, 7)); // array(2, 5, 7)
|
|||
$val = max('string', array(2, 5, 7), 42); // array(2, 5, 7)
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>min</function> and
|
||||
<function>count</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>min</function> and
|
||||
<function>count</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.min">
|
||||
<refnamediv>
|
||||
<refname>min</refname>
|
||||
<refpurpose>Find lowest value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>min</methodname>
|
||||
<methodparam><type>number</type><parameter>arg1</parameter></methodparam>
|
||||
<methodparam><type>number</type><parameter>arg2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>number</type><parameter>...</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>min</methodname>
|
||||
<methodparam><type>array</type><parameter>numbers</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>min</function> returns the numerically lowest of the
|
||||
parameter values.
|
||||
</para>
|
||||
<para>
|
||||
If the first and only parameter is an array, <function>min</function>
|
||||
returns the lowest value in that array. If the first parameter
|
||||
is an integer, string or float, you need at least two parameters
|
||||
and <function>min</function> returns the smallest of these values.
|
||||
You can compare an unlimited number of values.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
PHP will evaluate a non-numeric <type>string</type> as
|
||||
<literal>0</literal>, but still return the string if it's seen as the
|
||||
numerically lowest value. If multiple arguments evaluate to
|
||||
<literal>0</literal>, <function>min</function> will return the lowest
|
||||
alphanumerical string value if any strings are given, else a numeric
|
||||
<literal>0</literal> is returned.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title>Example uses of <function>min</function></title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.min">
|
||||
<refnamediv>
|
||||
<refname>min</refname>
|
||||
<refpurpose>Find lowest value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>min</methodname>
|
||||
<methodparam><type>number</type><parameter>arg1</parameter></methodparam>
|
||||
<methodparam><type>number</type><parameter>arg2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>number</type><parameter>...</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>min</methodname>
|
||||
<methodparam><type>array</type><parameter>numbers</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>min</function> returns the numerically lowest of the
|
||||
parameter values.
|
||||
</para>
|
||||
<para>
|
||||
If the first and only parameter is an array, <function>min</function>
|
||||
returns the lowest value in that array. If the first parameter
|
||||
is an integer, string or float, you need at least two parameters
|
||||
and <function>min</function> returns the smallest of these values.
|
||||
You can compare an unlimited number of values.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
PHP will evaluate a non-numeric <type>string</type> as
|
||||
<literal>0</literal>, but still return the string if it's seen as the
|
||||
numerically lowest value. If multiple arguments evaluate to
|
||||
<literal>0</literal>, <function>min</function> will return the lowest
|
||||
alphanumerical string value if any strings are given, else a numeric
|
||||
<literal>0</literal> is returned.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title>Example uses of <function>min</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo min(2, 3, 1, 6, 7); // 1
|
||||
|
@ -61,15 +61,15 @@ $val = min(array(2, 4, 8), array(2, 5, 1)); // array(2, 4, 8)
|
|||
$val = min('string', array(2, 5, 7), 42); // string
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>max</function> and
|
||||
<function>count</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>max</function> and
|
||||
<function>count</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mt-getrandmax">
|
||||
<refnamediv>
|
||||
<refname>mt_getrandmax</refname>
|
||||
<refpurpose>Show largest possible random value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_getrandmax</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the maximum value that can be returned by a call to
|
||||
<function>mt_rand</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>mt_rand</function>,
|
||||
<function>mt_srand</function>, and
|
||||
<function>getrandmax</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.mt-getrandmax">
|
||||
<refnamediv>
|
||||
<refname>mt_getrandmax</refname>
|
||||
<refpurpose>Show largest possible random value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_getrandmax</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns the maximum value that can be returned by a call to
|
||||
<function>mt_rand</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>mt_rand</function>,
|
||||
<function>mt_srand</function>, and
|
||||
<function>getrandmax</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mt-rand">
|
||||
<refnamediv>
|
||||
<refname>mt_rand</refname>
|
||||
<refpurpose>Generate a better random value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_rand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Many random number generators of older libcs have dubious or
|
||||
unknown characteristics and are slow. By default, PHP uses the
|
||||
libc random number generator with the <function>rand</function>
|
||||
function. The <function>mt_rand</function> function is a drop-in
|
||||
replacement for this. It uses a random number generator with
|
||||
known characteristics using the <ulink url="&url.mersenne;">
|
||||
Mersenne Twister</ulink>, which will produce random numbers four times
|
||||
faster than what the average libc rand() provides.
|
||||
</simpara>
|
||||
<simpara>
|
||||
If called without the optional <parameter>min</parameter>,
|
||||
<parameter>max</parameter> arguments <function>mt_rand</function>
|
||||
returns a pseudo-random value between 0 and
|
||||
<constant>RAND_MAX</constant>. If you want a random number
|
||||
between 5 and 15 (inclusive), for example, use <literal>mt_rand
|
||||
(5, 15)</literal>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mt_rand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.mt-rand">
|
||||
<refnamediv>
|
||||
<refname>mt_rand</refname>
|
||||
<refpurpose>Generate a better random value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>mt_rand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Many random number generators of older libcs have dubious or
|
||||
unknown characteristics and are slow. By default, PHP uses the
|
||||
libc random number generator with the <function>rand</function>
|
||||
function. The <function>mt_rand</function> function is a drop-in
|
||||
replacement for this. It uses a random number generator with
|
||||
known characteristics using the <ulink url="&url.mersenne;">
|
||||
Mersenne Twister</ulink>, which will produce random numbers four times
|
||||
faster than what the average libc rand() provides.
|
||||
</simpara>
|
||||
<simpara>
|
||||
If called without the optional <parameter>min</parameter>,
|
||||
<parameter>max</parameter> arguments <function>mt_rand</function>
|
||||
returns a pseudo-random value between 0 and
|
||||
<constant>RAND_MAX</constant>. If you want a random number
|
||||
between 5 and 15 (inclusive), for example, use <literal>mt_rand
|
||||
(5, 15)</literal>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mt_rand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo mt_rand() . "\n";
|
||||
|
@ -43,36 +43,36 @@ echo mt_rand() . "\n";
|
|||
echo mt_rand(5, 15);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
1604716014
|
||||
1478613278
|
||||
6
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
¬e.randomseed;
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
¬e.randomseed;
|
||||
|
||||
<note>
|
||||
<para>
|
||||
In versions before 3.0.7 the meaning of
|
||||
<parameter>max</parameter> was <parameter>range</parameter>. To
|
||||
get the same results in these versions the short example should
|
||||
be <literal>mt_rand (5, 11)</literal> to get a random number
|
||||
between 5 and 15.
|
||||
</para>
|
||||
</note>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>mt_srand</function>,
|
||||
<function>mt_getrandmax</function>, and
|
||||
<function>rand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<note>
|
||||
<para>
|
||||
In versions before 3.0.7 the meaning of
|
||||
<parameter>max</parameter> was <parameter>range</parameter>. To
|
||||
get the same results in these versions the short example should
|
||||
be <literal>mt_rand (5, 11)</literal> to get a random number
|
||||
between 5 and 15.
|
||||
</para>
|
||||
</note>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>mt_srand</function>,
|
||||
<function>mt_getrandmax</function>, and
|
||||
<function>rand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mt-srand">
|
||||
<refnamediv>
|
||||
<refname>mt_srand</refname>
|
||||
<refpurpose>Seed the better random number generator</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>mt_srand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Seeds the random number generator with
|
||||
<parameter>seed</parameter>.
|
||||
Since PHP 4.2.0, the <parameter>seed</parameter>
|
||||
becomes optional and defaults to a random value if omitted.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mt_srand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.mt-srand">
|
||||
<refnamediv>
|
||||
<refname>mt_srand</refname>
|
||||
<refpurpose>Seed the better random number generator</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>mt_srand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Seeds the random number generator with
|
||||
<parameter>seed</parameter>.
|
||||
Since PHP 4.2.0, the <parameter>seed</parameter>
|
||||
becomes optional and defaults to a random value if omitted.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mt_srand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// seed with microseconds
|
||||
function make_seed()
|
||||
{
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
}
|
||||
mt_srand(make_seed());
|
||||
$randval = mt_rand();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
¬e.randomseed;
|
||||
¬e.randomseed;
|
||||
|
||||
<simpara>
|
||||
See also:
|
||||
<function>mt_rand</function>,
|
||||
<function>mt_getrandmax</function>, and
|
||||
<function>srand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>mt_rand</function>,
|
||||
<function>mt_getrandmax</function>, and
|
||||
<function>srand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.octdec">
|
||||
<refnamediv>
|
||||
<refname>octdec</refname>
|
||||
<refpurpose>Octal to decimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>octdec</methodname>
|
||||
<methodparam><type>string</type><parameter>octal_string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the decimal equivalent of the octal number
|
||||
represented by the <parameter>octal_string</parameter> argument.
|
||||
The largest number that can be converted is 17777777777 or 2147483647 in
|
||||
decimal.
|
||||
As of PHP 4.1.0, this function can also convert larger numbers. It returns
|
||||
<type>float</type> in that case.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>octdec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.octdec">
|
||||
<refnamediv>
|
||||
<refname>octdec</refname>
|
||||
<refpurpose>Octal to decimal</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>octdec</methodname>
|
||||
<methodparam><type>string</type><parameter>octal_string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the decimal equivalent of the octal number
|
||||
represented by the <parameter>octal_string</parameter> argument.
|
||||
The largest number that can be converted is 17777777777 or 2147483647 in
|
||||
decimal.
|
||||
As of PHP 4.1.0, this function can also convert larger numbers. It returns
|
||||
<type>float</type> in that case.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>octdec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo octdec('77') . "\n";
|
||||
echo octdec(decoct(45));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
63
|
||||
45
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>decoct</function>,
|
||||
<function>bindec</function>,
|
||||
<function>hexdec</function>, and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>decoct</function>,
|
||||
<function>bindec</function>,
|
||||
<function>hexdec</function>, and
|
||||
<function>base_convert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.pi">
|
||||
<refnamediv>
|
||||
<refname>pi</refname>
|
||||
<refpurpose>Get value of pi</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>pi</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns an approximation of pi. The returned <type>float</type>
|
||||
has a precision based on the
|
||||
<link linkend="ini.precision">precision</link> directive in
|
||||
&php.ini;, which defaults to <literal>14</literal>.
|
||||
Also, you can use the <constant>M_PI</constant> constant which yields
|
||||
identical results to <function>pi</function>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>pi</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.pi">
|
||||
<refnamediv>
|
||||
<refname>pi</refname>
|
||||
<refpurpose>Get value of pi</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>pi</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Returns an approximation of pi. The returned <type>float</type>
|
||||
has a precision based on the
|
||||
<link linkend="ini.precision">precision</link> directive in
|
||||
&php.ini;, which defaults to <literal>14</literal>.
|
||||
Also, you can use the <constant>M_PI</constant> constant which yields
|
||||
identical results to <function>pi</function>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>pi</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo pi(); // 3.1415926535898
|
||||
echo M_PI; // 3.1415926535898
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.pow">
|
||||
<refnamediv>
|
||||
<refname>pow</refname>
|
||||
<refpurpose>Exponential expression</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>pow</methodname>
|
||||
<methodparam><type>number</type><parameter>base</parameter></methodparam>
|
||||
<methodparam><type>number</type><parameter>exp</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <parameter>base</parameter> raised to the power of
|
||||
<parameter>exp</parameter>. If possible, this function will
|
||||
return an <type>integer</type>.
|
||||
</para>
|
||||
<para>
|
||||
If the power cannot be computed, a warning will be issued,
|
||||
and <function>pow</function> will return &false;. Since PHP 4.2.0
|
||||
<function>pow</function> doesn't issue any warning.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
PHP cannot handle negative <parameter>exp</parameter>s.
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>Some examples of <function>pow</function></title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.pow">
|
||||
<refnamediv>
|
||||
<refname>pow</refname>
|
||||
<refpurpose>Exponential expression</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>number</type><methodname>pow</methodname>
|
||||
<methodparam><type>number</type><parameter>base</parameter></methodparam>
|
||||
<methodparam><type>number</type><parameter>exp</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <parameter>base</parameter> raised to the power of
|
||||
<parameter>exp</parameter>. If possible, this function will
|
||||
return an <type>integer</type>.
|
||||
</para>
|
||||
<para>
|
||||
If the power cannot be computed, a warning will be issued,
|
||||
and <function>pow</function> will return &false;. Since PHP 4.2.0
|
||||
<function>pow</function> doesn't issue any warning.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
PHP cannot handle negative <parameter>exp</parameter>s.
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>Some examples of <function>pow</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -42,23 +42,23 @@ echo pow(-1, 5.5); // error
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<warning>
|
||||
<para>
|
||||
In PHP 4.0.6 and earlier <function>pow</function> always returned
|
||||
a <type>float</type>, and did not issue warnings.
|
||||
</para>
|
||||
</warning>
|
||||
<para>
|
||||
See also:
|
||||
<function>exp</function>,
|
||||
<function>sqrt</function>,
|
||||
<function>bcpow</function>, and
|
||||
<function>gmp_pow</function>,
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
<warning>
|
||||
<para>
|
||||
In PHP 4.0.6 and earlier <function>pow</function> always returned
|
||||
a <type>float</type>, and did not issue warnings.
|
||||
</para>
|
||||
</warning>
|
||||
<para>
|
||||
See also:
|
||||
<function>exp</function>,
|
||||
<function>sqrt</function>,
|
||||
<function>bcpow</function>, and
|
||||
<function>gmp_pow</function>,
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.8 -->
|
||||
<refentry id="function.rad2deg">
|
||||
<refnamediv>
|
||||
<refname>rad2deg</refname>
|
||||
<refpurpose>
|
||||
Converts the radian number to the equivalent number in degrees
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>rad2deg</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function converts <parameter>number</parameter> from radian
|
||||
to degrees.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>rad2deg</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.rad2deg">
|
||||
<refnamediv>
|
||||
<refname>rad2deg</refname>
|
||||
<refpurpose>
|
||||
Converts the radian number to the equivalent number in degrees
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>rad2deg</methodname>
|
||||
<methodparam><type>float</type><parameter>number</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function converts <parameter>number</parameter> from radian
|
||||
to degrees.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>rad2deg</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -29,14 +29,14 @@ echo rad2deg(M_PI_4); // 45
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.rand">
|
||||
<refnamediv>
|
||||
<refname>rand</refname>
|
||||
<refpurpose>Generate a random integer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>rand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
If called without the optional <parameter>min</parameter>,
|
||||
<parameter>max</parameter> arguments <function>rand</function>
|
||||
returns a pseudo-random integer between 0 and
|
||||
<constant>RAND_MAX</constant>. If you want a random number
|
||||
between 5 and 15 (inclusive), for example, use <literal>rand (5,
|
||||
15)</literal>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>rand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.rand">
|
||||
<refnamediv>
|
||||
<refname>rand</refname>
|
||||
<refpurpose>Generate a random integer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>rand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
If called without the optional <parameter>min</parameter>,
|
||||
<parameter>max</parameter> arguments <function>rand</function>
|
||||
returns a pseudo-random integer between 0 and
|
||||
<constant>RAND_MAX</constant>. If you want a random number
|
||||
between 5 and 15 (inclusive), for example, use <literal>rand (5,
|
||||
15)</literal>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>rand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo rand() . "\n";
|
||||
|
@ -33,46 +33,46 @@ echo rand() . "\n";
|
|||
echo rand(5, 15);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
7771
|
||||
22264
|
||||
11
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
On some platforms (such as Windows) <constant>RAND_MAX</constant>
|
||||
is only 32768. If you require a range larger than 32768, specifying
|
||||
<parameter>min</parameter> and <parameter>max</parameter> will allow
|
||||
you to create a range larger than RAND_MAX, or consider using
|
||||
<function>mt_rand</function> instead.
|
||||
</simpara>
|
||||
</note>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
On some platforms (such as Windows) <constant>RAND_MAX</constant>
|
||||
is only 32768. If you require a range larger than 32768, specifying
|
||||
<parameter>min</parameter> and <parameter>max</parameter> will allow
|
||||
you to create a range larger than RAND_MAX, or consider using
|
||||
<function>mt_rand</function> instead.
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
¬e.randomseed;
|
||||
¬e.randomseed;
|
||||
|
||||
<note>
|
||||
<para>
|
||||
In versions before 3.0.7 the meaning of
|
||||
<parameter>max</parameter> was <parameter>range</parameter>. To
|
||||
get the same results in these versions the short example should
|
||||
be <literal>rand (5, 11)</literal> to get a random number
|
||||
between 5 and 15.
|
||||
</para>
|
||||
</note>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>srand</function>,
|
||||
<function>getrandmax</function>, and
|
||||
<function>mt_rand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<note>
|
||||
<para>
|
||||
In versions before 3.0.7 the meaning of
|
||||
<parameter>max</parameter> was <parameter>range</parameter>. To
|
||||
get the same results in these versions the short example should
|
||||
be <literal>rand (5, 11)</literal> to get a random number
|
||||
between 5 and 15.
|
||||
</para>
|
||||
</note>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>srand</function>,
|
||||
<function>getrandmax</function>, and
|
||||
<function>mt_rand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.round">
|
||||
<refnamediv>
|
||||
<refname>round</refname>
|
||||
<refpurpose>Rounds a float</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>round</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>precision</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the rounded value of <parameter>val</parameter> to
|
||||
specified <parameter>precision</parameter>
|
||||
(number of digits after the decimal point).
|
||||
<parameter>precision</parameter> can also be negative or zero (default).
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>round</function> examples</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.round">
|
||||
<refnamediv>
|
||||
<refname>round</refname>
|
||||
<refpurpose>Rounds a float</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>round</methodname>
|
||||
<methodparam><type>float</type><parameter>val</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>precision</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the rounded value of <parameter>val</parameter> to
|
||||
specified <parameter>precision</parameter>
|
||||
(number of digits after the decimal point).
|
||||
<parameter>precision</parameter> can also be negative or zero (default).
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>round</function> examples</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo round(3.4); // 3
|
||||
|
@ -35,50 +35,50 @@ echo round(5.045, 2); // 5.05
|
|||
echo round(5.055, 2); // 5.06
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<!-- It's not true
|
||||
<para>
|
||||
<caution>
|
||||
<simpara>
|
||||
When rounding on exact halves <function>round</function> rounds down on
|
||||
evens and up on odds. If you want to always force it in one direction
|
||||
on a .5 (or .05 in your case) add or substract a tiny fuzz factor. The
|
||||
reason behind rounding half the values down and the other half up is to
|
||||
avoid the classical banking problem where if you always rounded down
|
||||
you would be stealing money from your customers, or if you always
|
||||
rounded up you would end up over time losing money. By averaging it
|
||||
out through evens and odds you statistically break even.
|
||||
</simpara>
|
||||
</caution>
|
||||
</para>
|
||||
-->
|
||||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
PHP doesn't handle strings like <literal>"12,300.2"</literal> correctly
|
||||
by default. See <link linkend="language.types.string.conversion"
|
||||
>converting from strings</link>.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
The <parameter>precision</parameter> parameter was introduced
|
||||
in PHP 4.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<!-- It's not true
|
||||
<para>
|
||||
<caution>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>ceil</function>,
|
||||
<function>floor</function>, and
|
||||
<function>number_format</function>.
|
||||
When rounding on exact halves <function>round</function> rounds down on
|
||||
evens and up on odds. If you want to always force it in one direction
|
||||
on a .5 (or .05 in your case) add or substract a tiny fuzz factor. The
|
||||
reason behind rounding half the values down and the other half up is to
|
||||
avoid the classical banking problem where if you always rounded down
|
||||
you would be stealing money from your customers, or if you always
|
||||
rounded up you would end up over time losing money. By averaging it
|
||||
out through evens and odds you statistically break even.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</caution>
|
||||
</para>
|
||||
-->
|
||||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
PHP doesn't handle strings like <literal>"12,300.2"</literal> correctly
|
||||
by default. See <link linkend="language.types.string.conversion"
|
||||
>converting from strings</link>.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
The <parameter>precision</parameter> parameter was introduced
|
||||
in PHP 4.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>ceil</function>,
|
||||
<function>floor</function>, and
|
||||
<function>number_format</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.sin">
|
||||
<refnamediv>
|
||||
<refname>sin</refname>
|
||||
<refpurpose>Sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>sin</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>sin</function> returns the sine of the <parameter>arg</parameter>
|
||||
parameter. The <parameter>arg</parameter> parameter is in radians.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>sin</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.sin">
|
||||
<refnamediv>
|
||||
<refname>sin</refname>
|
||||
<refpurpose>Sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>sin</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>sin</function> returns the sine of the <parameter>arg</parameter>
|
||||
parameter. The <parameter>arg</parameter> parameter is in radians.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>sin</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -29,18 +29,18 @@ echo sin(60); // -0.304810621 ...
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>asin</function>,
|
||||
<function>cos</function>,
|
||||
<function>tan</function>, and
|
||||
<function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>asin</function>,
|
||||
<function>cos</function>,
|
||||
<function>tan</function>, and
|
||||
<function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.57 -->
|
||||
<refentry id="function.sinh">
|
||||
<refnamediv>
|
||||
<refname>sinh</refname>
|
||||
<refpurpose>Hyperbolic sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>sinh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hyperbolic sine of <parameter>arg</parameter>,
|
||||
defined as <literal>(exp(arg) - exp(-arg))/2</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>sin</function>,
|
||||
<function>asinh</function>,
|
||||
<function>cos</function>, and
|
||||
<function>tan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.sinh">
|
||||
<refnamediv>
|
||||
<refname>sinh</refname>
|
||||
<refpurpose>Hyperbolic sine</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>sinh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hyperbolic sine of <parameter>arg</parameter>,
|
||||
defined as <literal>(exp(arg) - exp(-arg))/2</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>sin</function>,
|
||||
<function>asinh</function>,
|
||||
<function>cos</function>, and
|
||||
<function>tan</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.sqrt">
|
||||
<refnamediv>
|
||||
<refname>sqrt</refname>
|
||||
<refpurpose>Square root</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>sqrt</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the square root of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>sqrt</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.sqrt">
|
||||
<refnamediv>
|
||||
<refname>sqrt</refname>
|
||||
<refpurpose>Square root</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>sqrt</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the square root of <parameter>arg</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>sqrt</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Precision depends on your precision directive
|
||||
|
@ -26,14 +26,14 @@ echo sqrt(9); // 3
|
|||
echo sqrt(10); // 3.16227766 ...
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>pow</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>pow</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.srand">
|
||||
<refnamediv>
|
||||
<refname>srand</refname>
|
||||
<refpurpose>Seed the random number generator</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>srand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Seeds the random number generator with <parameter>seed</parameter>.
|
||||
Since PHP 4.2.0, the <parameter>seed</parameter>
|
||||
becomes optional and defaults to a random value if omitted.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>srand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.srand">
|
||||
<refnamediv>
|
||||
<refname>srand</refname>
|
||||
<refpurpose>Seed the random number generator</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>srand</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>seed</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Seeds the random number generator with <parameter>seed</parameter>.
|
||||
Since PHP 4.2.0, the <parameter>seed</parameter>
|
||||
becomes optional and defaults to a random value if omitted.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>srand</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// seed with microseconds
|
||||
function make_seed()
|
||||
{
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
}
|
||||
srand(make_seed());
|
||||
$randval = rand();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
¬e.randomseed;
|
||||
¬e.randomseed;
|
||||
|
||||
<simpara>
|
||||
See also:
|
||||
<function>rand</function>,
|
||||
<function>getrandmax</function>, and
|
||||
<function>mt_srand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<simpara>
|
||||
See also:
|
||||
<function>rand</function>,
|
||||
<function>getrandmax</function>, and
|
||||
<function>mt_srand</function>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.57 -->
|
||||
<refentry id="function.tan">
|
||||
<refnamediv>
|
||||
<refname>tan</refname>
|
||||
<refpurpose>Tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>tan</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tan</function> returns the tangent of the <parameter>arg</parameter>
|
||||
parameter. The <parameter>arg</parameter> parameter is in radians.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tan</function> example</title>
|
||||
<programlisting role="php">
|
||||
<refentry id="function.tan">
|
||||
<refnamediv>
|
||||
<refname>tan</refname>
|
||||
<refpurpose>Tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>tan</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tan</function> returns the tangent of the <parameter>arg</parameter>
|
||||
parameter. The <parameter>arg</parameter> parameter is in radians.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tan</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
@ -27,18 +27,18 @@ echo tan(M_PI_4); // 1
|
|||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>atan</function>,
|
||||
<function>sin</function>,
|
||||
<function>cos</function>, and
|
||||
<function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>atan</function>,
|
||||
<function>sin</function>,
|
||||
<function>cos</function>, and
|
||||
<function>deg2rad</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.tanh">
|
||||
<refnamediv>
|
||||
<refname>tanh</refname>
|
||||
<refpurpose>Hyperbolic tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>tanh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hyperbolic tangent of <parameter>arg</parameter>,
|
||||
defined as <literal>sinh(arg)/cosh(arg)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>tan</function>,
|
||||
<function>atanh</function>,
|
||||
<function>sin</function>, and
|
||||
<function>cos</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.tanh">
|
||||
<refnamediv>
|
||||
<refname>tanh</refname>
|
||||
<refpurpose>Hyperbolic tangent</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>float</type><methodname>tanh</methodname>
|
||||
<methodparam><type>float</type><parameter>arg</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the hyperbolic tangent of <parameter>arg</parameter>,
|
||||
defined as <literal>sinh(arg)/cosh(arg)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
See also:
|
||||
<function>tan</function>,
|
||||
<function>atanh</function>,
|
||||
<function>sin</function>, and
|
||||
<function>cos</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
Loading…
Reference in a new issue