cvs: phpdoc /kr/functions math.xml
| From: | cycle98 | Date: | Sat, 03 Feb 2001 01:46:59 +0000 |
| Subject: | cvs: phpdoc /kr/functions math.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969334125@lists.php.net to get a copy of this message | ||
cycle98 Fri Feb 2 17:46:59 2001 EDT
Modified files:
/phpdoc/kr/functions math.xml
Log:
translation english to korean by SeungHwan Lee 001
Index: phpdoc/kr/functions/math.xml diff -u phpdoc/kr/functions/math.xml:1.2 phpdoc/kr/functions/math.xml:1.3 --- phpdoc/kr/functions/math.xml:1.2 Fri Jan 12 06:16:40 2001 +++ phpdoc/kr/functions/math.xml Fri Feb 2 17:46:59 2001 @@ -1,1155 +1,1191 @@ - <reference id="ref.math"> - <title>Mathematical Functions</title> - <titleabbrev>Math.</titleabbrev> - - <partintro> - <sect1 id="math.intro"> - <title>Introduction</title> - <para> - These math functions will only handle values within the range of - the long and double types on your computer. If you need to - handle bigger numbers, take a look at the <link - linkend="ref.bc">arbitrary precision math functions</link>. - </para> - <sect2 id="math.constants"> - <title>Math constants</title> - <para> - The following values are defined as constants in PHP by the math - extension: - <table> - <title>Math constants</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Constant</entry> - <entry>Value</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>M_PI</entry> - <entry>3.14159265358979323846</entry> - <entry>Pi</entry> - </row> - <row> - <entry>M_E</entry> - <entry>2.7182818284590452354</entry> - <entry>e</entry> - </row> - <row> - <entry>M_LOG2E</entry> - <entry>1.4426950408889634074</entry> - <entry>log_2 e</entry> - </row> - <row> - <entry>M_LOG10E</entry> - <entry>0.43429448190325182765</entry> - <entry>log_10 e</entry> - </row> - <row> - <entry>M_LN2</entry> - <entry>0.69314718055994530942</entry> - <entry>log_e 2</entry> - </row> - <row> - <entry>M_LN10</entry> - <entry>2.30258509299404568402</entry> - <entry>log_e 10</entry> - </row> - <row> - <entry>M_PI_2</entry> - <entry>1.57079632679489661923</entry> - <entry>pi/2</entry> - </row> - <row> - <entry>M_PI_4</entry> - <entry>0.78539816339744830962</entry> - <entry>pi/4</entry> - </row> - <row> - <entry>M_1_PI</entry> - <entry>0.31830988618379067154</entry> - <entry>1/pi</entry> - </row> - <row> - <entry>M_2_PI</entry> - <entry>0.63661977236758134308</entry> - <entry>2/pi</entry> - </row> - <row> - <entry>M_SQRTPI</entry> - <entry>1.77245385090551602729</entry> - <entry>sqrt(pi) [4.0.2]</entry> - </row> - <row> - <entry>M_2_SQRTPI</entry> - <entry>1.12837916709551257390</entry> - <entry>2/sqrt(pi)</entry> - </row> - <row> - <entry>M_SQRT2</entry> - <entry>1.41421356237309504880</entry> - <entry>sqrt(2)</entry> - </row> - <row> - <entry>M_SQRT3</entry> - <entry>1.73205080756887729352</entry> - <entry>sqrt(3) [4.0.2]</entry> - </row> - <row> - <entry>M_SQRT1_2</entry> - <entry>0.70710678118654752440</entry> - <entry>1/sqrt(2)</entry> - </row> - <row> - <entry>M_LNPI</entry> - <entry>1.14472988584940017414</entry> - <entry>log_e(pi) [4.0.2]</entry> - </row> - <row> - <entry>M_EULER</entry> - <entry>0.57721566490153286061</entry> - <entry>Euler constant [4.0.2]</entry> - </row> - </tbody> - </tgroup> - </table> - Only M_PI is available in PHP versions up to and including PHP4RC1. - All other constants are available starting with PHP 4.0. Constants - labelled [4.0.2] were added in PHP 4.0.2. - </para> - </sect2> - </sect1> - </partintro> - - <refentry id="function.abs"> - <refnamediv> - <refname>abs</refname> - <refpurpose>Absolute value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>abs</function></funcdef> - <paramdef>mixed <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the absolute value of number. If the argument number is - float, return type is also float, otherwise it is int. - </para> - </refsect1> - </refentry> - - <refentry id="function.acos"> - <refnamediv> - <refname>acos</refname> - <refpurpose>Arc cosine</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>acos</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the arc cosine of arg in radians. - </para> - <para> - See also <function>asin</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> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>asin</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the arc sine of arg in radians. - </para> - <para> - See also <function>acos</function> and <function>atan</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.atan"> - <refnamediv> - <refname>atan</refname> - <refpurpose>Arc tangent</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>atan</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the arc tangent of arg in radians. - </para> - <para> - See also <function>asin</function> and <function>acos</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.atan2"> - <refnamediv> - <refname>atan2</refname> - <refpurpose>arc tangent of two variables</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>atan2</function></funcdef> - <paramdef>float <parameter>y</parameter></paramdef> - <paramdef>float <parameter>x</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <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.base-convert"> - <refnamediv> - <refname>base_convert</refname> - <refpurpose>Convert a number between arbitrary bases</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>base_convert</function></funcdef> - <paramdef>string <parameter>number</parameter></paramdef> - <paramdef>int <parameter>frombase</parameter></paramdef> - <paramdef>int <parameter>tobase</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <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></title> - <programlisting role="php"> -$binary = base_convert ($hexadecimal, 16, 2); -</programlisting> - </example> - </para> - </refsect1> - </refentry> - - - <refentry id="function.bindec"> - <refnamediv> - <refname>bindec</refname> - <refpurpose>Binary to decimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>bindec</function></funcdef> - <paramdef>string <parameter>binary_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the decimal equivalent of the binary number represented by - the binary_string argument. - </para> - <para> - Octdec converts a binary number to a decimal number. The largest - number that can be converted is 31 bits of 1's or 2147483647 in - decimal. - </para> - <para> - See also the <function>decbin</function> - function. - </para> - </refsect1> - </refentry> - - <refentry id="function.ceil"> - <refnamediv> - <refname>ceil</refname> - <refpurpose>Round fractions up</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>ceil</function></funcdef> - <paramdef>float <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the next highest integer value from - <parameter>number</parameter>. Using <function>ceil</function> - on integers is absolutely a waste of time. - <informalexample> - <programlisting role="php"> -$x = ceil(4.25); -// which would make $x=5 - </programlisting> - </informalexample> - </para> - <simpara> - NOTE: PHP/FI 2's <function>ceil</function> returned a - float. Use: <literal>$new = (double)ceil($number);</literal> to - get the old behaviour. - </simpara> - <simpara> - See also <function>floor</function> and - <function>round</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.cos"> - <refnamediv> - <refname>cos</refname> - <refpurpose>Cosine</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>cos</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the cosine of arg in radians. - </para> - <para> - See also <function>sin</function> and <function>tan</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.decbin"> - <refnamediv> - <refname>decbin</refname> - <refpurpose>Decimal to binary</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>decbin</function></funcdef> - <paramdef>int <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns a string containing a binary representation of the given - number argument. The largest number that can be converted is - 2147483647 in decimal resulting to a string of 31 1's. - </para> - <para> - See also the <function>bindec</function> function. - </para> - </refsect1> - </refentry> - - <refentry id="function.dechex"> - <refnamediv> - <refname>dechex</refname> - <refpurpose>Decimal to hexadecimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>dechex</function></funcdef> - <paramdef>int <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns a string containing a hexadecimal representation of the - given number argument. The largest number that can - be converted is 2147483647 in decimal resulting to "7fffffff". - </para> - <para> - See also the <function>hexdec</function> function. - </para> - </refsect1> - </refentry> - - <refentry id="function.decoct"> - <refnamediv> - <refname>decoct</refname> - <refpurpose>Decimal to octal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>decoct</function></funcdef> - <paramdef>int <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns a string containing an octal representation of the given - number argument. The largest number that can be converted is - 2147483647 in decimal resulting to "17777777777". - </para> - <para> - See also <function>octdec</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.deg2rad"> - <refnamediv> - <refname>deg2rad</refname> - <refpurpose> - Converts the number in degrees to the radian equivalent - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>deg2rad</function></funcdef> - <paramdef>double <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - This function converts <parameter>number</parameter> from degrees - to the radian equivalent. - </para> - <para> - See also <function>rad2deg</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.exp"> - <refnamediv> - <refname>exp</refname> - <refpurpose>e to the power of ...</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>exp</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns e raised to the power of <parameter>arg</parameter>. - </para> - <para> - See also <function>pow</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.floor"> - <refnamediv> - <refname>floor</refname> - <refpurpose>Round fractions down</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>floor</function></funcdef> - <paramdef>float <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - Returns the next lowest integer value from - <parameter>number</parameter>. Using <function>floor</function> - on integers is absolutely a waste of time. - </simpara> - <simpara> - NOTE: PHP/FI 2's <function>floor</function> returned a - float. Use: <literal>$new = (double)floor($number);</literal> to - get the old behaviour. - </simpara> - <simpara> - See also <function>ceil</function> and - <function>round</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.getrandmax"> - <refnamediv> - <refname>getrandmax</refname> - <refpurpose>Show largest possible random value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>getrandmax</function></funcdef> - <paramdef>void </paramdef> - </funcprototype> - </funcsynopsis> - <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>, - <function>mt_rand</function>, <function>mt_srand</function>, and - <function>mt_getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.hexdec"> - <refnamediv> - <refname>hexdec</refname> - <refpurpose>Hexadecimal to decimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>hexdec</function></funcdef> - <paramdef>string <parameter>hex_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the decimal equivalent of the hexadecimal number - represented by the hex_string argument. HexDec converts a - hexadecimal string to a decimal number. The largest number that - can be converted is 7fffffff or 2147483647 in decimal. - </para> - <para> - See also the <function>dechex</function> function. - </para> - </refsect1> - </refentry> - - <refentry id="function.lcg-value"> - <refnamediv> - <refname>lcg_value</refname> - <refpurpose>Combined linear congruential generator</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>lcg_value</function></funcdef> - <void/> - </funcprototype> - </funcsynopsis> - <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.log"> - <refnamediv> - <refname>log</refname> - <refpurpose>Natural logarithm</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>log</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the natural logarithm of arg. - </para> - </refsect1> - </refentry> - - <refentry id="function.log10"> - <refnamediv> - <refname>log10</refname> - <refpurpose>Base-10 logarithm</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>log10</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the base-10 logarithm of <parameter>arg</parameter>. - </para> - </refsect1> - </refentry> - - <refentry id="function.max"> - <refnamediv> - <refname>max</refname> - <refpurpose>Find highest value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>max</function></funcdef> - <paramdef>mixed <parameter>arg1</parameter></paramdef> - <paramdef>mixed <parameter>arg2</parameter></paramdef> - <paramdef>mixed <parameter>argn</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>max</function> returns the numerically highest of the - parameter values. - </para> - <para> - If the first parameter is an array, <function>max</function> - returns the highest value in that array. If the first parameter - is an integer, string or double, 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> - <para> - If one or more of the values is a double, all the values will be - treated as doubles, and a double is returned. If none of the - values is a double, all of them will be treated as integers, and - an integer is returned. - </para> - </refsect1> - </refentry> - - <refentry id="function.min"> - <refnamediv> - <refname>min</refname> - <refpurpose>Find lowest value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>min</function></funcdef> - <paramdef>mixed <parameter>arg1</parameter></paramdef> - <paramdef>mixed <parameter>arg2</parameter></paramdef> - <paramdef>mixed <parameter>argn</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>Min</function> returns the numerically lowest of the - parameter values. - </para> - <para> - If the first parameter is an array, <function>min</function> - returns the lowest value in that array. If the first parameter - is an integer, string or double, you need at least two parameters - and <function>min</function> returns the lowest of these values. - You can compare an unlimited number of values. - </para> - <para> - If one or more of the values is a double, all the values will be - treated as doubles, and a double is returned. If none of the - values is a double, all of them will be treated as integers, and - an integer is returned. - </para> - </refsect1> - </refentry> - - <refentry id="function.mt-rand"> - <refnamediv> - <refname>mt_rand</refname> - <refpurpose>Generate a better random value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>mt_rand</function></funcdef> - <paramdef>int - <parameter><optional>min</optional></parameter> - </paramdef> - <paramdef>int - <parameter><optional>max</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <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. <function>mt_rand</function> function is a drop-in - replacement for this. It uses a random number generator with - known characteristics, the Mersenne Twister, which will produce - random numbers that should be suitable for seeding some kinds - of cryptography (see the home pages for details) and is four - times faster than what the average libc provides. The Homepage - of the Mersenne Twister can be found at - <ulink url="&url.mersenne;">&url.mersenne;</ulink>, and an - optimized version of the MT source is available from - <ulink url="&url.mersenne.twister;">&url.mersenne.twister; - </ulink>. - </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> - <simpara> - Remember to seed the random number generator before use with - <function>mt_srand</function>. - </simpara> - <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>, <function>srand</function>, - <function>rand</function> and <function>getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.mt-srand"> - <refnamediv> - <refname>mt_srand</refname> - <refpurpose>Seed the better random number generator</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>mt_srand</function></funcdef> - <paramdef>int <parameter>seed</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Seeds the random number generator with - <parameter>seed</parameter>. - <informalexample> - <programlisting role="php"> -// seed with microseconds since last "whole" second -mt_srand ((double) microtime() * 1000000); -$randval = mt_rand(); - </programlisting> - </informalexample> - </para> - <simpara> - See also <function>mt_rand</function>, - <function>mt_getrandmax</function>, <function>srand</function>, - <function>rand</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> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>mt_getrandmax</function></funcdef> - <paramdef>void </paramdef> - </funcprototype> - </funcsynopsis> - <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> <function>rand</function>, - <function>srand</function>, and - <function>getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.number-format"> - <refnamediv> - <refname>number_format</refname> - <refpurpose>Format a number with grouped thousands</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>number_format</function></funcdef> - <paramdef>float <parameter>number</parameter></paramdef> - <paramdef>int <parameter>decimals</parameter></paramdef> - <paramdef>string <parameter>dec_point</parameter></paramdef> - <paramdef>string <parameter>thousands_sep</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>Number_format</function> returns a formatted version of - <parameter>number</parameter>. This function accepts either one, - two or four parameters (not three): - </para> - <para>If only one parameter is given, - <parameter>Number</parameter> will be formatted without decimals, - but with a comma (",") between every group of thousands. - </para> - <para> - If two parameters are given, <parameter>number</parameter> will - be formatted with <parameter>decimals</parameter> decimals with a - dot (".") in front, and a comma (",") between every group of - thousands. - </para> - <para> - If all four parameters are given, <parameter>number</parameter> - will be formatted with <parameter>decimals</parameter> decimals, - <parameter>dec_point</parameter> instead of a dot (".") before - the decimals and <parameter>thousands_sep</parameter> instead of - a comma (",") between every group of thousands. - </para> - </refsect1> - </refentry> - - <refentry id="function.octdec"> - <refnamediv> - <refname>octdec</refname> - <refpurpose>Octal to decimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>octdec</function></funcdef> - <paramdef>string <parameter>octal_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the decimal equivalent of the octal number - represented by the octal_string argument. - OctDec converts an octal string to a decimal number. The largest - number that can be converted is 17777777777 or 2147483647 in - decimal. - </para> - <para> - See also <function>decoct</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.pi"> - <refnamediv> - <refname>pi</refname> - <refpurpose>Get value of pi</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>pi</function></funcdef> - <paramdef>void </paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - Returns an approximation of pi. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.pow"> - <refnamediv> - <refname>pow</refname> - <refpurpose>Exponential expression</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>pow</function></funcdef> - <paramdef>float <parameter>base</parameter></paramdef> - <paramdef>float <parameter>exp</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns base raised to the power of exp. - </para> - <para> - See also <function>exp</function>. - </para> - </refsect1> - </refentry> - - <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> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>rad2deg</function></funcdef> - <paramdef>double <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - This function converts <parameter>number</parameter> from radian - to degrees. - </para> - <para> - See also <function>deg2rad</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.rand"> - <refnamediv> - <refname>rand</refname> - <refpurpose>Generate a random value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>rand</function></funcdef> - <paramdef> - <parameter><optional>int min</optional></parameter> - </paramdef> - <paramdef> - <parameter><optional>int max</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - If called without the optional <parameter>min</parameter>, - <parameter>max</parameter> arguments <function>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>rand (5, - 15)</literal>. - </simpara> - <simpara> - Remember to seed the random number generator before use with - <function>srand</function>. - </simpara> - <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>, <function>mt_rand</function>, - <function>mt_srand</function>, and - <function>mt_getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.round"> - <refnamediv> - <refname>round</refname> - <refpurpose>Rounds a float</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>round</function></funcdef> - <paramdef>double <parameter>val</parameter></paramdef> - <paramdef>int - <parameter><optional>precision</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the rounded value of <parameter>val</parameter> to - specified <parameter>precision</parameter> - (number of digits after the decimal point). - <informalexample> - <programlisting role="php"> -$foo = round (3.4); // $foo == 3.0 -$foo = round (3.5); // $foo == 4.0 -$foo = round (3.6); // $foo == 4.0 - -$foo = round (1.95583, 2); // $foo == 1.96 - </programlisting> - </informalexample> - </para> - <note> - <simpara> - The <parameter>precision</parameter> parameter is only - available in PHP 4. - </simpara> - </note> - <simpara> - See also <function>ceil</function> and - <function>floor</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.sin"> - <refnamediv> - <refname>sin</refname> - <refpurpose>Sine</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>sin</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the sine of arg in radians. - </para> - <para> - See also <function>cos</function> and <function>tan</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.sqrt"> - <refnamediv> - <refname>sqrt</refname> - <refpurpose>Square root</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>sqrt</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the square root of <parameter>arg</parameter>. - </para> - </refsect1> - </refentry> - - <refentry id="function.srand"> - <refnamediv> - <refname>srand</refname> - <refpurpose>Seed the random number generator</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>srand</function></funcdef> - <paramdef>int <parameter>seed</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Seeds the random number generator with - <parameter>seed</parameter>. - <informalexample> - <programlisting role="php"> -// seed with microseconds since last "whole" second -srand ((double) microtime() * 1000000); -$randval = rand(); - </programlisting> - </informalexample> - </para> - <simpara> - See also <function>rand</function>, - <function>getrandmax</function>, <function>mt_rand</function>, - <function>mt_srand</function>, and - <function>mt_getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.tan"> - <refnamediv> - <refname>tan</refname> - <refpurpose>Tangent</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>tan</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the tangent of arg in radians. - </para> - <para> - See also <function>sin</function> and <function>cos</function>. - </para> - </refsect1> - </refentry> - - </reference> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:1 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:"../../manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> +<reference id="ref.math"> + <title>Mathematical Functions</title> + <titleabbrev>Math.</titleabbrev> + <partintro> + <sect1 id="math.intro"> + <title>ìê°</title> + <para> + ì´ ìí í¨ìë ë¹ì ì»´í¨í°ì long ê³¼ double íì ë²ì ìììë§ ê°ë¤ì ë¤ë£¬ë¤. + ë§ì½ ë í° ì를 ë¤ë£¨ê³ ì íë¤ë©´ <link linkend="ref.bc">arbitrary precision math functions</link> 를 ë³´ë¼. + </para> + <sect2 id="math.constants"> + <title>Math constants</title> + <para> + ë¤ìì ê°ë¤ì PHPìì math extensionì ìí´ ì ìë ìì ì´ë¤.: + <table> + <title>Math constants</title> + <tgroup cols="3"> + <thead> + <row> + <entry>ìì</entry> + <entry>ê°</entry> + <entry>ì¤ëª </entry> + </row> + </thead> + <tbody> + <row> + <entry>M_PI</entry> + <entry>3.14159265358979323846</entry> + <entry>Pi</entry> + </row> + <row> + <entry>M_E</entry> + <entry>2.7182818284590452354</entry> + <entry>e</entry> + </row> + <row> + <entry>M_LOG2E</entry> + <entry>1.4426950408889634074</entry> + <entry>log_2 e</entry> + </row> + <row> + <entry>M_LOG10E</entry> + <entry>0.43429448190325182765</entry> + <entry>log_10 e</entry> + </row> + <row> + <entry>M_LN2</entry> + <entry>0.69314718055994530942</entry> + <entry>log_e 2</entry> + </row> + <row> + <entry>M_LN10</entry> + <entry>2.30258509299404568402</entry> + <entry>log_e 10</entry> + </row> + <row> + <entry>M_PI_2</entry> + <entry>1.57079632679489661923</entry> + <entry>pi/2</entry> + </row> + <row> + <entry>M_PI_4</entry> + <entry>0.78539816339744830962</entry> + <entry>pi/4</entry> + </row> + <row> + <entry>M_1_PI</entry> + <entry>0.31830988618379067154</entry> + <entry>1/pi</entry> + </row> + <row> + <entry>M_2_PI</entry> + <entry>0.63661977236758134308</entry> + <entry>2/pi</entry> + </row> + <row> + <entry>M_SQRTPI</entry> + <entry>1.77245385090551602729</entry> + <entry>sqrt(pi) [4.0.2]</entry> + </row> + <row> + <entry>M_2_SQRTPI</entry> + <entry>1.12837916709551257390</entry> + <entry>2/sqrt(pi)</entry> + </row> + <row> + <entry>M_SQRT2</entry> + <entry>1.41421356237309504880</entry> + <entry>sqrt(2)</entry> + </row> + <row> + <entry>M_SQRT3</entry> + <entry>1.73205080756887729352</entry> + <entry>sqrt(3) [4.0.2]</entry> + </row> + <row> + <entry>M_SQRT1_2</entry> + <entry>0.70710678118654752440</entry> + <entry>1/sqrt(2)</entry> + </row> + <row> + <entry>M_LNPI</entry> + <entry>1.14472988584940017414</entry> + <entry>log_e(pi) [4.0.2]</entry> + </row> + <row> + <entry>M_EULER</entry> + <entry>0.57721566490153286061</entry> + <entry>Euler constant [4.0.2]</entry> + </row> + </tbody> + </tgroup> + </table> + PHP4RC1 ê¹ì§ë ë¨ì§ M_PI ë§ì´ ì ì©íë©°, ë¤ë¥¸ 모ë ììë¤ì + PHP 4.0. ì´íì ê°ë¥íë¤. + [4.0.2]ë¼ë ë¼ë²¨ì´ ë¶ì ììë PHP 4.0.2. ìì ì¶ê°ë ììì´ë¤. + </para> + </sect2> + </sect1> + </partintro> + <refentry id="function.abs"> + <refnamediv> + <refname>abs</refname> + <refpurpose>ì ëê°</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>abs</function> + </funcdef> + <paramdef>mixed <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ì«ìì ì ëê°ì ë°ííë¤. + ì¸ìë¡ ì¨ ì«ìê° float íì´ë©´ ë°í íì ë ìì float ì´ë©°, ì´ë ë¤ë¥¸ íì ëí´ìë ëì¼íë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.acos"> + <refnamediv> + <refname>acos</refname> + <refpurpose>ìí¬ ì½ì¬ì¸(Arc cosine)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>acos</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ìí¬ ì½ì¬ì¸(Arc cosine) ê°ì ë¼ëì¸ì¼ë¡ ë°ííë¤. + </para> + <para> + <function>asin</function> ê·¸ë¦¬ê³ <function>atan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.asin"> + <refnamediv> + <refname>asin</refname> + <refpurpose>ìí¬ ì¬ì¸(Arc sine)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>asin</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ìí¬ ì¬ì¸(Arc sine) ë¼ëì¸ì¼ë¡ ê°ì ë°ííë¤. + </para> + <para> + <function>acos</function> ê·¸ë¦¬ê³ <function>atan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.atan"> + <refnamediv> + <refname>atan</refname> + <refpurpose>ìí¬ íì í¸(Arc tangent)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>atan</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ìí¬ íì í¸(Arc tangent)ê°ì ë¼ëì¸ì¼ë¡ ë°ííë¤. + </para> + <para> + <function>asin</function> ê·¸ë¦¬ê³ <function>acos</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.atan2"> + <refnamediv> + <refname>atan2</refname> + <refpurpose>ë ë³ìì ìí¬ íì í¸(arc tangent)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>atan2</function> + </funcdef> + <paramdef>float <parameter>y</parameter> + </paramdef> + <paramdef>float <parameter>x</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + ì´ í¨ìë ë ë³ì <parameter>x</parameter> ì <parameter>y</parameter>ì + ìí¬ íì í¸(arc tangent) ê°ì ë°ííë¤. + ì´ë ê° ì¸ìë¤ì ë¶í¸ê° ê²°ê³¼ì 4ë¶êµ¬ê°ì ê²°ì íëë° ì¬ì©ëë¤ë ì ì ì ì¸íê³ ë + <parameter>y</parameter> / <parameter>x</parameter>ì + ìí¬ íì í¸ ê°ì ê³ì°íë ê²ê³¼ ëì¼íë¤. + </simpara> + <simpara> + ì´ í¨ìë ê²°ê³¼ë ë¼ëìì¼ë¡ ë°ííëë° ê·¸ ë²ìë -PI ë³´ë¤ í¬ê±°ë ê°ê³ + PI ë³´ë¤ ìê±°ë ê°ì ê°ì ë²ìê° ëë¤. + </simpara> + <para> + <function>acos</function> ê·¸ë¦¬ê³ <function>atan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.base-convert"> + <refnamediv> + <refname>base_convert</refname> + <refpurpose>ììì ë² ì´ì¤(arbitrary bases) ì¬ì´ìì ì«ì를 ë³ííë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>base_convert</function> + </funcdef> + <paramdef>string <parameter>number</parameter> + </paramdef> + <paramdef>int <parameter>frombase</parameter> + </paramdef> + <paramdef>int <parameter>tobase</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>number</parameter>ì í´ë¹íë 문ìì´ + <parameter>tobase</parameter> ë² ì´ì¤ë¡ ë°ê¾¸ì´ ë°ííë¤. + <parameter>number</parameter>ì ë² ì´ì¤ë + <parameter>frombase</parameter>ìì ëª ìëë¤. + <parameter>frombase</parameter> ì <parameter>tobase</parameter>ë + ë ë¤ 2 ë³´ë¤ í¬ê±°ë ê°ê³ 36 ë³´ë¤ ìê±°ë ê°ì ê°ì´ ìì¼ íë¤. + 10 ë³´ë¤ í° ì«ì(digit) aìì z ê¹ì§ì 문ìë¡ ëíë´ë©°, + a ë 10ì bë 11ì ê·¸ë¦¬ê³ zë 35ì í´ë¹íë ì«ì를 ëíë¸ë¤. + <example> + <title> + <function>Base_convert</function> + </title> + <programlisting role="php"> +$binary = base_convert ($hexadecimal, 16, 2); +</programlisting> + </example> + </para> + </refsect1> + </refentry> + <refentry id="function.bindec"> + <refnamediv> + <refname>bindec</refname> + <refpurpose>2ì§ì를 10ì§ìë¡ ë°ê¾¼ë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>bindec</function> + </funcdef> + <paramdef>string <parameter>binary_string</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 2ì§ ë¬¸ìì´ ì ìí´ ííëë 2ì§ì를 ëì¼í 10ì§ìë¡ ë°ííë¤. + </para> + <para> + bindec ë 2ì§ì를 10ì§ìë¡ ë³ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë 1ì 31ë¹í¸(1111111111111111111111111111111), + ìì§ìë¡ 2147483647 ì´ë¤. + </para> + <para> + <function>decbin</function> í¨ì를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.ceil"> + <refnamediv> + <refname>ceil</refname> + <refpurpose>ì¬ë¦¼íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ceil</function> + </funcdef> + <paramdef>float <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>number</parameter>ë³´ë¤ í¬ê±°ë ê°ì ê°ì¥ í° ì ì를 ë°ííë¤.(ì¬ë¦¼) + ì ìì <function>ceil</function>를 ì°ë ê²ì ìê° ëë¹ì¼ ë¿ì´ë¤. + <informalexample> + <programlisting role="php"> +$x = ceil(4.25); +// $x=5 ì ê°ì ê°ëë¤. + </programlisting> + </informalexample> + </para> + <simpara> + 주ì: PHP/FI 2 ì <function>ceil</function> í¨ìë float íì ë°ííë¤. + ì¬ì©: PHP/FI 2 ì 결과를 ì»ê¸° ìí´ <literal>$new = (double)ceil($number);</literal> 를 ì¬ì©íë¼. + </simpara> + <simpara> + <function>floor</function> ê·¸ë¦¬ê³ + <function>round</function>를 ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.cos"> + <refnamediv> + <refname>cos</refname> + <refpurpose>ì½ì¬ì¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>cos</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + argì ì½ì¬ì¸ ê°ì ë¼ëìì¼ë¡ ë°ííë¤. + </para> + <para> + See also <function>sin</function> and <function>tan</function>. + </para> + </refsect1> + </refentry> + <refentry id="function.decbin"> + <refnamediv> + <refname>decbin</refname> + <refpurpose>10ì§ì를 2ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>decbin</function> + </funcdef> + <paramdef>int <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 주ì´ì§ ì«ì를 2ì§ííì í¬í¨íë 문ìì´ë¡ ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë ìì§ìë¡ 2147483647 ì´ë¯ë¡ + ê²°ê³¼ë 1ì 31ë¹í¸(1111111111111111111111111111111)ê° ëë¤. + </para> + <para> + <function>bindec</function> í¨ì를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.dechex"> + <refnamediv> + <refname>dechex</refname> + <refpurpose>10ì§ì를 16ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>dechex</function> + </funcdef> + <paramdef>int <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 주ì´ì§ ì«ì를 16ì§ì를 íííë 문ìì´ë¡ ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë ìì§ìë¡ 2147483647ì´ë¯ë¡ + ê²°ê³¼ë 16ì§ìë¡ "7fffffff" ê° ëë¤. + </para> + <para> + See also the <function>hexdec</function> function. + </para> + </refsect1> + </refentry> + <refentry id="function.decoct"> + <refnamediv> + <refname>decoct</refname> + <refpurpose>ìì§ì를 8ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>decoct</function> + </funcdef> + <paramdef>int <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 주ì´ì§ ì«ì를 8ì§ì ííë¡ íííë 문ìì´ì ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë ìì§ìë¡ 2147483647ì´ë©° + ê²°ê³¼ë "17777777777" ì´ ëë¤. + </para> + <para> + <function>octdec</function>를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.deg2rad"> + <refnamediv> + <refname>deg2rad</refname> + <refpurpose> + ê°ë(degree)를 ëì¼í ë¼ëì ê°ì¼ë¡ ë³ííë¤. + </refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>deg2rad</function> + </funcdef> + <paramdef>double <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ì´ í¨ìë <parameter>number</parameter>를 ê°ë(degree)ìì ëì¼í ë¼ëì ê°ì¼ë¡ ë³ííë¤. + </para> + <para> + <function>rad2deg</function>를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.exp"> + <refnamediv> + <refname>exp</refname> + <refpurpose>e ì ì¹ì</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>exp</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + e(2.718...)ì <parameter>arg</parameter>ì¹ì ë°ííë¤. + </para> + <para> + <function>pow</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.floor"> + <refnamediv> + <refname>floor</refname> + <refpurpose>ê°ì ë´ë¦¼íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>floor</function> + </funcdef> + <paramdef>float <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <parameter>number</parameter>ë³´ë¤ ìê±°ë ê°ì ê°ì¥ ìì ì ì를 ë°ííë¤. + <function>floor</function>ì ì ì를 ì¬ì©íë ê²ì ìê° ëë¹ì¼ ë¿ì´ë¤. + </simpara> + <simpara> + 주ì : PHP/FI 2 ìì <function>floor</function>ë float íì ë°ííë¤. + ì´ ë²ì ¼ì í¨ê³¼ë¥¼ ë´ê¸° ìí´ <literal>$new = (double)floor($number);</literal>를 ì¬ì©íë¼. + </simpara> + <simpara> + <function>ceil</function> ê·¸ë¦¬ê³ + <function>round</function>를 ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.getrandmax"> + <refnamediv> + <refname>getrandmax</refname> + <refpurpose>ê°ë¥í ê°ì¥ í° ììì´ ê°ì ë³´ì¬ì¤ë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>getrandmax</function> + </funcdef> + <paramdef>void </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>rand</function> í¨ìì í¸ì¶ì ìí´ ë°ì ì ìë ê°ì¥ í° ê°ì ë°ííë¤. + </simpara> + <simpara> + <function>rand</function>, <function>srand</function>, + <function>mt_rand</function>, <function>mt_srand</function>, ê·¸ë¦¬ê³ + <function>mt_getrandmax</function>ì ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.hexdec"> + <refnamediv> + <refname>hexdec</refname> + <refpurpose>16ì§ì를 10ì§ìë¡ ë³ííë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>hexdec</function> + </funcdef> + <paramdef>string <parameter>hex_string</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 16ì§ì ì«ìì í´ë¹íë 10ì§ì ê°ì 10ì§ì ííë¡ ë°ííë¤. + HecDecë 16ì§ì 문ìì´ì 10ì§ì 문ìì´ë¡ ë³ííë©°, + ë³íë ì ìë ê°ì¥ í° ìë 7fffffff ì´ê±°ë 10ì§ìë¡ 2147483647 ì´ë¤. + </para> + <para> + <function>dechex</function>í¨ì를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.lcg-value"> + <refnamediv> + <refname>lcg_value</refname> + <refpurpose>Combined linear congruential generator</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>lcg_value</function> + </funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + <function>lcg_value</function>ë (0, 1) ì¬ì´ì ìì¬ ëë¤ ì«ì(pseudo number)를 ë°ííë¤. + ì´ í¨ìë 2^31 - 85 ì 2^31 - 249 ì¬ì´ì ëê°ì CG를 ì¡°í©íë¤. + ì´ í¨ìì 구ê°ì ë ììì ì°ë¬¼ê³¼ ì¼ì¹íë¤. + (The period of this function is equal to the product of both primes.) + </para> + </refsect1> + </refentry> + <refentry id="function.log"> + <refnamediv> + <refname>log</refname> + <refpurpose>ìì°ë¡ê·¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>log</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + argì ìì°ë¡ê·¸ë¥¼ ë°ííë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.log10"> + <refnamediv> + <refname>log10</refname> + <refpurpose>ìì©ë¡ê·¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>log10</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ì¬ì©ë¡ê·¸ ê°ì ë°ííë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.max"> + <refnamediv> + <refname>max</refname> + <refpurpose>ê°ì¥ í° ê°ì ì°¾ëë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>max</function> + </funcdef> + <paramdef>mixed <parameter>arg1</parameter> + </paramdef> + <paramdef>mixed <parameter>arg2</parameter> + </paramdef> + <paramdef>mixed <parameter>argn</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>max</function>ë ë§¤ê° ë³ìì ê° ì¤ ì«ìë¡ íìëë ê°ì¥ í° ê°ì ë°ííë¤. + </para> + <para> + ì²ì 매ê°ë³ìê° ë°°ì´ì´ë¼ë©´, <function>max</function>ë + ê·¸ ë°°ì´ì ìë ê° ì¤ ê°ì¥ í° ê°ì ë°ííë¤. + ì²ì 매ê°ë³ìê° ì ì, 문ìì´ í¹ì ëë¸íì´ë¼ë©´, + ìµìí ëê°ì ë§¤ê° ë³ìê° íìíë©°, <function>max</function> ë + ì´ ê°ë¤ ì¤ ê°ì¥ í° ê°ì ë°ííë¤. + ë¹êµëë ê°ë¤ì ìë 무ì¬íì´ë¤. + </para> + <para> + íë í¹ì ê·¸ ì´ìì ê°ì´ ëë¸íì´ë¼ë©°ë 모ë ê°ì ëë¸íì¼ë¡ ì¬ê²¨ì§ë©°, + ëë¸íì´ ë°íëë¤. + ì´ëê² íëë ëë¸íì´ ìëë©´, 모ë ê²ì´ ì ìë¡ ì¬ê²¨ì§ë©°, ì ìíì´ ë°íëë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.min"> + <refnamediv> + <refname>min</refname> + <refpurpose>ê°ì¥ ìì ê°ì ì°¾ëë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>min</function> + </funcdef> + <paramdef>mixed <parameter>arg1</parameter> + </paramdef> + <paramdef>mixed <parameter>arg2</parameter> + </paramdef> + <paramdef>mixed <parameter>argn</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>Min</function>ë 매ê°ë³ìì ê° ì¤ ì«ìë¡ íìëë ê°ì¥ ìì ê°ì ë°ííë¤. + </para> + <para> + ì²ì 매ê°ë³ìê° ë°°ì´ì´ë¼ë©´, <function>min</function>ì + ê·¸ ë°°ì´ì ìë ê° ì¤ ê°ì¥ ìì ê°ì ë°ííë¤. + ì²ì 매ê°ë³ìê° ì ì, 문ìì´ í¹ì ëë¸íì´ë¼ë©´, + ìµìí ëê°ì ë§¤ê° ë³ìê° íìíë©°, <function>min</function>ì + ì´ ê°ë¤ ì¤ ê°ì¥ ìì ê°ì ë°ííë¤. + ë¹êµëë ê°ë¤ì ìë 무ì¬íì´ë¤. + </para> + <para> + íë í¹ì ê·¸ ì´ìì ê°ì´ ëë¸íì´ë¼ë©°ë 모ë ê°ì ëë¸íì¼ë¡ ì¬ê²¨ì§ë©°, + ëë¸íì´ ë°íëë¤. + ì´ëê² íëë ëë¸íì´ ìëë©´, 모ë ê²ì´ ì ìë¡ ì¬ê²¨ì§ë©°, ì ìíì´ ë°íëë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.mt-rand"> + <refnamediv> + <refname>mt_rand</refname> + <refpurpose>ë ì¢ì ëë¤ê°ì ìì±íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mt_rand</function> + </funcdef> + <paramdef>int + <parameter> + <optional>min</optional> + </parameter> + </paramdef> + <paramdef>int + <parameter> + <optional>max</optional> + </parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + ìì libcì ë§ì ëì ìì±ê¸°ë 모í¸íê±°ë í¹ì + unknown characteristics를 ê°ê³ ìì¼ë©° ë리ë¤. + 기본ì ì¼ë¡ PHPì <function>rand</function>í¨ìë + libc ëì ìì±ê¸°ë¥¼ ì¬ì©íë¤. + <function>mt_rand</function> í¨ìë ì´ë¥¼ ìí + ëë¡-ì¸ êµì²´(drop-in replacement) ì´ë¤. + ì´ í¨ìë ëì ë°ìê¸°ë¡ known characteristics를 ì¬ì©íë©°, + Many random number generators of older libcs have or + unknown characteristics and are slow. By default, PHP uses the + libc random number generator with the <function>rand</function> + function. <function>mt_rand</function> function is a drop-in + replacement for this. It uses a random number generator with + known characteristics, the Mersenne Twister, which will produce + random numbers that should be suitable for seeding some kinds + of cryptography (see the home pages for details) and is four + times faster than what the average libc provides. The Homepage + of the Mersenne Twister can be found at + <ulink url="&url.mersenne;">&url.mersenne;</ulink>, and an + optimized version of the MT source is available from + <ulink url="&url.mersenne.twister;">&url.mersenne.twister; + </ulink>. + </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> + <simpara> + Remember to seed the random number generator before use with + <function>mt_srand</function>. + </simpara> + <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>, <function>srand</function>, + <function>rand</function> and <function>getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.mt-srand"> + <refnamediv> + <refname>mt_srand</refname> + <refpurpose>Seed the better random number generator</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>mt_srand</function> + </funcdef> + <paramdef>int <parameter>seed</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + Seeds the random number generator with + <parameter>seed</parameter>. + <informalexample> + <programlisting role="php"> +// seed with microseconds since last "whole" second +mt_srand ((double) microtime() * 1000000); +$randval = mt_rand(); + </programlisting> + </informalexample> + </para> + <simpara> + See also <function>mt_rand</function>, + <function>mt_getrandmax</function>, <function>srand</function>, + <function>rand</function>, and + <function>getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.mt-getrandmax"> + <refnamediv> + <refname>mt_getrandmax</refname> + <refpurpose>ê°ì¥ í° ëë¤ê°ì ë³´ì¬ì¤ë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mt_getrandmax</function> + </funcdef> + <paramdef>void </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>mt_rand</function>ì í¸ì¶ì ìí´ ë°íë ì ìë ê°ì¥ í° ê°ì ë°ííë¤. + </simpara> + <simpara> + <function>mt_rand</function>, + <function>mt_srand</function> + <function>rand</function>, + <function>srand</function>, ê·¸ë¦¬ê³ + <function>getrandmax</function>ì ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.number-format"> + <refnamediv> + <refname>number_format</refname> + <refpurpose>ì«ì를 ì²ë¨ìë¡ ë¬¶ì´ì íííë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>number_format</function> + </funcdef> + <paramdef>float <parameter>number</parameter> + </paramdef> + <paramdef>int <parameter>decimals</parameter> + </paramdef> + <paramdef>string <parameter>dec_point</parameter> + </paramdef> + <paramdef>string <parameter>thousands_sep</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>Number_format</function>ì <parameter>number</parameter>ì ì ííë íí 를 ë°ííë¤. + ì´ í¨ìë íë, ëê° í¹ì ë¤ê°(ì¸ê°ë ì¬ ì ìë¤.)ì 매ê°ë³ì를 ê°ì§ ì ìë¤. + </para> + <para> + íëì 매ê°ë³ìë§ ì£¼ì´ì§ë©´, ê·¸ë¥ ì«ìê° ìë 매 ì²ë¨ìë§ë¤ 콤ë§(",")를 ê°ì§ ííê° ë°íëë¤. + (ìì주:ìì ì´íì리ë ë°ì¬ë¦¼ ëë¤.) + </para> + <para> + ëê°ì 매ê°ë³ìê° ì£¼ì´ì§ë©´, <parameter>number</parameter>ë + <parameter>decimals</parameter>ì리 ììì ì ê°ì§ê³ ì²ë¨ìë§ë¤ 콤ë§(",")ê° + ë¶ì ííê° ë°íëë¤. + </para> + <para> + 매ê°ë³ì 4ê°ê° 주ì´ì§ë©´, <parameter>number</parameter>ë + <parameter>decimals</parameter>ì리ì ììì ì ê°ê³ , + dot(".") ëì <parameter>dec_point</parameter>ê° ëì²´ëë©°, + ì²ë¨ì ë§ë¤ ì¬ì© ë ì½¤ë§ (",") ëì <parameter>thousands_sep</parameter>ê° + ì ì©ë ííê° ë°íëë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.octdec"> + <refnamediv> + <refname>octdec</refname> + <refpurpose>8ì§ì를 10ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>octdec</function> + </funcdef> + <paramdef>string <parameter>octal_string</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 8ì§ì ííë¡ ííëë octal_string ì¸ì를 ì´í´ í´ë¹íë 8ì§ìì ëë±í + 10ì§ìë¡ ë°ííë¤. + OctDecë 8ì§ì를 10ì§ìë¡ ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ê°ì 17777777777 í¹ì 10ì§ìë¡ 2147483647 ì´ë¤. + </para> + <para> + <function>decoct</function>를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.pi"> + <refnamediv> + <refname>pi</refname> + <refpurpose>íì´(pi)ê°ì ì»ëë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>pi</function> + </funcdef> + <paramdef>void </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + íì´(pi)ì ê·¼ì¬ê°ì ë°ííë¤. + </simpara> + </refsect1> + </refentry> + <refentry id="function.pow"> + <refnamediv> + <refname>pow</refname> + <refpurpose>ê±°ëì ê³±</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>pow</function> + </funcdef> + <paramdef>float <parameter>base</parameter> + </paramdef> + <paramdef>float <parameter>exp</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>base</parameter>ì <parameter>exp</parameter>ì¹ ê°ì ë°ííë¤. + </para> + <para> + <function>exp</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.rad2deg"> + <refnamediv> + <refname>rad2deg</refname> + <refpurpose> + ë¼ëìì ê°ëë¡ ë³ííë¤. + </refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>rad2deg</function> + </funcdef> + <paramdef>double <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ì´ í¨ìë <parameter>number</parameter>ì ë¼ëììì ê°ëë¡ ë³ííë¤. + </para> + <para> + <function>deg2rad</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.rand"> + <refnamediv> + <refname>rand</refname> + <refpurpose>ëì를 ë°ìíë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>rand</function> + </funcdef> + <paramdef> + <parameter> + <optional>int min</optional> + </parameter> + </paramdef> + <paramdef> + <parameter> + <optional>int max</optional> + </parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <parameter>min</parameter>ìì´ í¸ì¶ëë©´, + If called without the optional <parameter>min</parameter>, + <parameter>max</parameter> arguments <function>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>rand (5, + 15)</literal>. + </simpara> + <simpara> + Remember to seed the random number generator before use with + <function>srand</function>. + </simpara> + <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>, <function>mt_rand</function>, + <function>mt_srand</function>, and + <function>mt_getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.round"> + <refnamediv> + <refname>round</refname> + <refpurpose>ì¤ì를 ë°ì¬ë¦¼íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>round</function> + </funcdef> + <paramdef>double <parameter>val</parameter> + </paramdef> + <paramdef>int + <parameter> + <optional>precision</optional> + </parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ììì <parameter>precision</parameter> ì리(ììì ì´íì ì리ì)ê¹ì§ + <parameter>val</parameter>ì ë°ì¬ë¦¼íë¤. + <informalexample> + <programlisting role="php"> +$foo = round (3.4); // $foo == 3.0 +$foo = round (3.5); // $foo == 4.0 +$foo = round (3.6); // $foo == 4.0 + +$foo = round (1.95583, 2); // $foo == 1.96 + </programlisting> + </informalexample> + </para> + <note> + <simpara> + <parameter>precision</parameter> ë PHP 4 ììë§ ì ì©íë¤. + </simpara> + </note> + <simpara> + <function>ceil</function> ê·¸ë¦¬ê³ + <function>floor</function>ì ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.sin"> + <refnamediv> + <refname>sin</refname> + <refpurpose>ì¬ì¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>sin</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + argì ì¬ì¸ê°ì ë¼ëìì¼ë¡ ë°ííë¤. + </para> + <para> + <function>cos</function> ê·¸ë¦¬ê³ <function>tan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.sqrt"> + <refnamediv> + <refname>sqrt</refname> + <refpurpose>íë°©ì 곱근(루í¸)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>sqrt</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì íë°©ì 곱근ì ë°ííë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.srand"> + <refnamediv> + <refname>srand</refname> + <refpurpose>Seed the random number generator</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>srand</function> + </funcdef> + <paramdef>int <parameter>seed</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + Seeds the random number generator with + <parameter>seed</parameter>. + <informalexample> + <programlisting role="php"> +// seed with microseconds since last "whole" second +srand ((double) microtime() * 1000000); +$randval = rand(); + </programlisting> + </informalexample> + </para> + <simpara> + See also <function>rand</function>, + <function>getrandmax</function>, <function>mt_rand</function>, + <function>mt_srand</function>, and + <function>mt_getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.tan"> + <refnamediv> + <refname>tan</refname> + <refpurpose>Tangent</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>tan</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + Returns the tangent of arg in radians. + </para> + <para> + See also <function>sin</function> and <function>cos</function>. + </para> + </refsect1> + </refentry> +</reference> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +-->
Index: phpdoc/kr/functions/math.xml diff -u phpdoc/kr/functions/math.xml:1.2 phpdoc/kr/functions/math.xml:1.3 --- phpdoc/kr/functions/math.xml:1.2 Fri Jan 12 06:16:40 2001 +++ phpdoc/kr/functions/math.xml Fri Feb 2 17:46:59 2001 @@ -1,1155 +1,1191 @@ - <reference id="ref.math"> - <title>Mathematical Functions</title> - <titleabbrev>Math.</titleabbrev> - - <partintro> - <sect1 id="math.intro"> - <title>Introduction</title> - <para> - These math functions will only handle values within the range of - the long and double types on your computer. If you need to - handle bigger numbers, take a look at the <link - linkend="ref.bc">arbitrary precision math functions</link>. - </para> - <sect2 id="math.constants"> - <title>Math constants</title> - <para> - The following values are defined as constants in PHP by the math - extension: - <table> - <title>Math constants</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Constant</entry> - <entry>Value</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>M_PI</entry> - <entry>3.14159265358979323846</entry> - <entry>Pi</entry> - </row> - <row> - <entry>M_E</entry> - <entry>2.7182818284590452354</entry> - <entry>e</entry> - </row> - <row> - <entry>M_LOG2E</entry> - <entry>1.4426950408889634074</entry> - <entry>log_2 e</entry> - </row> - <row> - <entry>M_LOG10E</entry> - <entry>0.43429448190325182765</entry> - <entry>log_10 e</entry> - </row> - <row> - <entry>M_LN2</entry> - <entry>0.69314718055994530942</entry> - <entry>log_e 2</entry> - </row> - <row> - <entry>M_LN10</entry> - <entry>2.30258509299404568402</entry> - <entry>log_e 10</entry> - </row> - <row> - <entry>M_PI_2</entry> - <entry>1.57079632679489661923</entry> - <entry>pi/2</entry> - </row> - <row> - <entry>M_PI_4</entry> - <entry>0.78539816339744830962</entry> - <entry>pi/4</entry> - </row> - <row> - <entry>M_1_PI</entry> - <entry>0.31830988618379067154</entry> - <entry>1/pi</entry> - </row> - <row> - <entry>M_2_PI</entry> - <entry>0.63661977236758134308</entry> - <entry>2/pi</entry> - </row> - <row> - <entry>M_SQRTPI</entry> - <entry>1.77245385090551602729</entry> - <entry>sqrt(pi) [4.0.2]</entry> - </row> - <row> - <entry>M_2_SQRTPI</entry> - <entry>1.12837916709551257390</entry> - <entry>2/sqrt(pi)</entry> - </row> - <row> - <entry>M_SQRT2</entry> - <entry>1.41421356237309504880</entry> - <entry>sqrt(2)</entry> - </row> - <row> - <entry>M_SQRT3</entry> - <entry>1.73205080756887729352</entry> - <entry>sqrt(3) [4.0.2]</entry> - </row> - <row> - <entry>M_SQRT1_2</entry> - <entry>0.70710678118654752440</entry> - <entry>1/sqrt(2)</entry> - </row> - <row> - <entry>M_LNPI</entry> - <entry>1.14472988584940017414</entry> - <entry>log_e(pi) [4.0.2]</entry> - </row> - <row> - <entry>M_EULER</entry> - <entry>0.57721566490153286061</entry> - <entry>Euler constant [4.0.2]</entry> - </row> - </tbody> - </tgroup> - </table> - Only M_PI is available in PHP versions up to and including PHP4RC1. - All other constants are available starting with PHP 4.0. Constants - labelled [4.0.2] were added in PHP 4.0.2. - </para> - </sect2> - </sect1> - </partintro> - - <refentry id="function.abs"> - <refnamediv> - <refname>abs</refname> - <refpurpose>Absolute value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>abs</function></funcdef> - <paramdef>mixed <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the absolute value of number. If the argument number is - float, return type is also float, otherwise it is int. - </para> - </refsect1> - </refentry> - - <refentry id="function.acos"> - <refnamediv> - <refname>acos</refname> - <refpurpose>Arc cosine</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>acos</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the arc cosine of arg in radians. - </para> - <para> - See also <function>asin</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> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>asin</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the arc sine of arg in radians. - </para> - <para> - See also <function>acos</function> and <function>atan</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.atan"> - <refnamediv> - <refname>atan</refname> - <refpurpose>Arc tangent</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>atan</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the arc tangent of arg in radians. - </para> - <para> - See also <function>asin</function> and <function>acos</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.atan2"> - <refnamediv> - <refname>atan2</refname> - <refpurpose>arc tangent of two variables</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>atan2</function></funcdef> - <paramdef>float <parameter>y</parameter></paramdef> - <paramdef>float <parameter>x</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <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.base-convert"> - <refnamediv> - <refname>base_convert</refname> - <refpurpose>Convert a number between arbitrary bases</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>base_convert</function></funcdef> - <paramdef>string <parameter>number</parameter></paramdef> - <paramdef>int <parameter>frombase</parameter></paramdef> - <paramdef>int <parameter>tobase</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <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></title> - <programlisting role="php"> -$binary = base_convert ($hexadecimal, 16, 2); -</programlisting> - </example> - </para> - </refsect1> - </refentry> - - - <refentry id="function.bindec"> - <refnamediv> - <refname>bindec</refname> - <refpurpose>Binary to decimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>bindec</function></funcdef> - <paramdef>string <parameter>binary_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the decimal equivalent of the binary number represented by - the binary_string argument. - </para> - <para> - Octdec converts a binary number to a decimal number. The largest - number that can be converted is 31 bits of 1's or 2147483647 in - decimal. - </para> - <para> - See also the <function>decbin</function> - function. - </para> - </refsect1> - </refentry> - - <refentry id="function.ceil"> - <refnamediv> - <refname>ceil</refname> - <refpurpose>Round fractions up</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>ceil</function></funcdef> - <paramdef>float <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the next highest integer value from - <parameter>number</parameter>. Using <function>ceil</function> - on integers is absolutely a waste of time. - <informalexample> - <programlisting role="php"> -$x = ceil(4.25); -// which would make $x=5 - </programlisting> - </informalexample> - </para> - <simpara> - NOTE: PHP/FI 2's <function>ceil</function> returned a - float. Use: <literal>$new = (double)ceil($number);</literal> to - get the old behaviour. - </simpara> - <simpara> - See also <function>floor</function> and - <function>round</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.cos"> - <refnamediv> - <refname>cos</refname> - <refpurpose>Cosine</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>cos</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the cosine of arg in radians. - </para> - <para> - See also <function>sin</function> and <function>tan</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.decbin"> - <refnamediv> - <refname>decbin</refname> - <refpurpose>Decimal to binary</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>decbin</function></funcdef> - <paramdef>int <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns a string containing a binary representation of the given - number argument. The largest number that can be converted is - 2147483647 in decimal resulting to a string of 31 1's. - </para> - <para> - See also the <function>bindec</function> function. - </para> - </refsect1> - </refentry> - - <refentry id="function.dechex"> - <refnamediv> - <refname>dechex</refname> - <refpurpose>Decimal to hexadecimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>dechex</function></funcdef> - <paramdef>int <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns a string containing a hexadecimal representation of the - given number argument. The largest number that can - be converted is 2147483647 in decimal resulting to "7fffffff". - </para> - <para> - See also the <function>hexdec</function> function. - </para> - </refsect1> - </refentry> - - <refentry id="function.decoct"> - <refnamediv> - <refname>decoct</refname> - <refpurpose>Decimal to octal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>decoct</function></funcdef> - <paramdef>int <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns a string containing an octal representation of the given - number argument. The largest number that can be converted is - 2147483647 in decimal resulting to "17777777777". - </para> - <para> - See also <function>octdec</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.deg2rad"> - <refnamediv> - <refname>deg2rad</refname> - <refpurpose> - Converts the number in degrees to the radian equivalent - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>deg2rad</function></funcdef> - <paramdef>double <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - This function converts <parameter>number</parameter> from degrees - to the radian equivalent. - </para> - <para> - See also <function>rad2deg</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.exp"> - <refnamediv> - <refname>exp</refname> - <refpurpose>e to the power of ...</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>exp</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns e raised to the power of <parameter>arg</parameter>. - </para> - <para> - See also <function>pow</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.floor"> - <refnamediv> - <refname>floor</refname> - <refpurpose>Round fractions down</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>floor</function></funcdef> - <paramdef>float <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - Returns the next lowest integer value from - <parameter>number</parameter>. Using <function>floor</function> - on integers is absolutely a waste of time. - </simpara> - <simpara> - NOTE: PHP/FI 2's <function>floor</function> returned a - float. Use: <literal>$new = (double)floor($number);</literal> to - get the old behaviour. - </simpara> - <simpara> - See also <function>ceil</function> and - <function>round</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.getrandmax"> - <refnamediv> - <refname>getrandmax</refname> - <refpurpose>Show largest possible random value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>getrandmax</function></funcdef> - <paramdef>void </paramdef> - </funcprototype> - </funcsynopsis> - <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>, - <function>mt_rand</function>, <function>mt_srand</function>, and - <function>mt_getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.hexdec"> - <refnamediv> - <refname>hexdec</refname> - <refpurpose>Hexadecimal to decimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>hexdec</function></funcdef> - <paramdef>string <parameter>hex_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the decimal equivalent of the hexadecimal number - represented by the hex_string argument. HexDec converts a - hexadecimal string to a decimal number. The largest number that - can be converted is 7fffffff or 2147483647 in decimal. - </para> - <para> - See also the <function>dechex</function> function. - </para> - </refsect1> - </refentry> - - <refentry id="function.lcg-value"> - <refnamediv> - <refname>lcg_value</refname> - <refpurpose>Combined linear congruential generator</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>lcg_value</function></funcdef> - <void/> - </funcprototype> - </funcsynopsis> - <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.log"> - <refnamediv> - <refname>log</refname> - <refpurpose>Natural logarithm</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>log</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the natural logarithm of arg. - </para> - </refsect1> - </refentry> - - <refentry id="function.log10"> - <refnamediv> - <refname>log10</refname> - <refpurpose>Base-10 logarithm</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>log10</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the base-10 logarithm of <parameter>arg</parameter>. - </para> - </refsect1> - </refentry> - - <refentry id="function.max"> - <refnamediv> - <refname>max</refname> - <refpurpose>Find highest value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>max</function></funcdef> - <paramdef>mixed <parameter>arg1</parameter></paramdef> - <paramdef>mixed <parameter>arg2</parameter></paramdef> - <paramdef>mixed <parameter>argn</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>max</function> returns the numerically highest of the - parameter values. - </para> - <para> - If the first parameter is an array, <function>max</function> - returns the highest value in that array. If the first parameter - is an integer, string or double, 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> - <para> - If one or more of the values is a double, all the values will be - treated as doubles, and a double is returned. If none of the - values is a double, all of them will be treated as integers, and - an integer is returned. - </para> - </refsect1> - </refentry> - - <refentry id="function.min"> - <refnamediv> - <refname>min</refname> - <refpurpose>Find lowest value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>min</function></funcdef> - <paramdef>mixed <parameter>arg1</parameter></paramdef> - <paramdef>mixed <parameter>arg2</parameter></paramdef> - <paramdef>mixed <parameter>argn</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>Min</function> returns the numerically lowest of the - parameter values. - </para> - <para> - If the first parameter is an array, <function>min</function> - returns the lowest value in that array. If the first parameter - is an integer, string or double, you need at least two parameters - and <function>min</function> returns the lowest of these values. - You can compare an unlimited number of values. - </para> - <para> - If one or more of the values is a double, all the values will be - treated as doubles, and a double is returned. If none of the - values is a double, all of them will be treated as integers, and - an integer is returned. - </para> - </refsect1> - </refentry> - - <refentry id="function.mt-rand"> - <refnamediv> - <refname>mt_rand</refname> - <refpurpose>Generate a better random value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>mt_rand</function></funcdef> - <paramdef>int - <parameter><optional>min</optional></parameter> - </paramdef> - <paramdef>int - <parameter><optional>max</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <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. <function>mt_rand</function> function is a drop-in - replacement for this. It uses a random number generator with - known characteristics, the Mersenne Twister, which will produce - random numbers that should be suitable for seeding some kinds - of cryptography (see the home pages for details) and is four - times faster than what the average libc provides. The Homepage - of the Mersenne Twister can be found at - <ulink url="&url.mersenne;">&url.mersenne;</ulink>, and an - optimized version of the MT source is available from - <ulink url="&url.mersenne.twister;">&url.mersenne.twister; - </ulink>. - </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> - <simpara> - Remember to seed the random number generator before use with - <function>mt_srand</function>. - </simpara> - <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>, <function>srand</function>, - <function>rand</function> and <function>getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.mt-srand"> - <refnamediv> - <refname>mt_srand</refname> - <refpurpose>Seed the better random number generator</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>mt_srand</function></funcdef> - <paramdef>int <parameter>seed</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Seeds the random number generator with - <parameter>seed</parameter>. - <informalexample> - <programlisting role="php"> -// seed with microseconds since last "whole" second -mt_srand ((double) microtime() * 1000000); -$randval = mt_rand(); - </programlisting> - </informalexample> - </para> - <simpara> - See also <function>mt_rand</function>, - <function>mt_getrandmax</function>, <function>srand</function>, - <function>rand</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> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>mt_getrandmax</function></funcdef> - <paramdef>void </paramdef> - </funcprototype> - </funcsynopsis> - <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> <function>rand</function>, - <function>srand</function>, and - <function>getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.number-format"> - <refnamediv> - <refname>number_format</refname> - <refpurpose>Format a number with grouped thousands</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>number_format</function></funcdef> - <paramdef>float <parameter>number</parameter></paramdef> - <paramdef>int <parameter>decimals</parameter></paramdef> - <paramdef>string <parameter>dec_point</parameter></paramdef> - <paramdef>string <parameter>thousands_sep</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>Number_format</function> returns a formatted version of - <parameter>number</parameter>. This function accepts either one, - two or four parameters (not three): - </para> - <para>If only one parameter is given, - <parameter>Number</parameter> will be formatted without decimals, - but with a comma (",") between every group of thousands. - </para> - <para> - If two parameters are given, <parameter>number</parameter> will - be formatted with <parameter>decimals</parameter> decimals with a - dot (".") in front, and a comma (",") between every group of - thousands. - </para> - <para> - If all four parameters are given, <parameter>number</parameter> - will be formatted with <parameter>decimals</parameter> decimals, - <parameter>dec_point</parameter> instead of a dot (".") before - the decimals and <parameter>thousands_sep</parameter> instead of - a comma (",") between every group of thousands. - </para> - </refsect1> - </refentry> - - <refentry id="function.octdec"> - <refnamediv> - <refname>octdec</refname> - <refpurpose>Octal to decimal</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>octdec</function></funcdef> - <paramdef>string <parameter>octal_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the decimal equivalent of the octal number - represented by the octal_string argument. - OctDec converts an octal string to a decimal number. The largest - number that can be converted is 17777777777 or 2147483647 in - decimal. - </para> - <para> - See also <function>decoct</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.pi"> - <refnamediv> - <refname>pi</refname> - <refpurpose>Get value of pi</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>pi</function></funcdef> - <paramdef>void </paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - Returns an approximation of pi. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.pow"> - <refnamediv> - <refname>pow</refname> - <refpurpose>Exponential expression</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>pow</function></funcdef> - <paramdef>float <parameter>base</parameter></paramdef> - <paramdef>float <parameter>exp</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns base raised to the power of exp. - </para> - <para> - See also <function>exp</function>. - </para> - </refsect1> - </refentry> - - <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> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>rad2deg</function></funcdef> - <paramdef>double <parameter>number</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - This function converts <parameter>number</parameter> from radian - to degrees. - </para> - <para> - See also <function>deg2rad</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.rand"> - <refnamediv> - <refname>rand</refname> - <refpurpose>Generate a random value</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>rand</function></funcdef> - <paramdef> - <parameter><optional>int min</optional></parameter> - </paramdef> - <paramdef> - <parameter><optional>int max</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - If called without the optional <parameter>min</parameter>, - <parameter>max</parameter> arguments <function>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>rand (5, - 15)</literal>. - </simpara> - <simpara> - Remember to seed the random number generator before use with - <function>srand</function>. - </simpara> - <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>, <function>mt_rand</function>, - <function>mt_srand</function>, and - <function>mt_getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.round"> - <refnamediv> - <refname>round</refname> - <refpurpose>Rounds a float</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>double <function>round</function></funcdef> - <paramdef>double <parameter>val</parameter></paramdef> - <paramdef>int - <parameter><optional>precision</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the rounded value of <parameter>val</parameter> to - specified <parameter>precision</parameter> - (number of digits after the decimal point). - <informalexample> - <programlisting role="php"> -$foo = round (3.4); // $foo == 3.0 -$foo = round (3.5); // $foo == 4.0 -$foo = round (3.6); // $foo == 4.0 - -$foo = round (1.95583, 2); // $foo == 1.96 - </programlisting> - </informalexample> - </para> - <note> - <simpara> - The <parameter>precision</parameter> parameter is only - available in PHP 4. - </simpara> - </note> - <simpara> - See also <function>ceil</function> and - <function>floor</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.sin"> - <refnamediv> - <refname>sin</refname> - <refpurpose>Sine</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>sin</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the sine of arg in radians. - </para> - <para> - See also <function>cos</function> and <function>tan</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.sqrt"> - <refnamediv> - <refname>sqrt</refname> - <refpurpose>Square root</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>sqrt</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the square root of <parameter>arg</parameter>. - </para> - </refsect1> - </refentry> - - <refentry id="function.srand"> - <refnamediv> - <refname>srand</refname> - <refpurpose>Seed the random number generator</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>srand</function></funcdef> - <paramdef>int <parameter>seed</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Seeds the random number generator with - <parameter>seed</parameter>. - <informalexample> - <programlisting role="php"> -// seed with microseconds since last "whole" second -srand ((double) microtime() * 1000000); -$randval = rand(); - </programlisting> - </informalexample> - </para> - <simpara> - See also <function>rand</function>, - <function>getrandmax</function>, <function>mt_rand</function>, - <function>mt_srand</function>, and - <function>mt_getrandmax</function>. - </simpara> - </refsect1> - </refentry> - - <refentry id="function.tan"> - <refnamediv> - <refname>tan</refname> - <refpurpose>Tangent</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>float <function>tan</function></funcdef> - <paramdef>float <parameter>arg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Returns the tangent of arg in radians. - </para> - <para> - See also <function>sin</function> and <function>cos</function>. - </para> - </refsect1> - </refentry> - - </reference> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:1 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:"../../manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> +<reference id="ref.math"> + <title>Mathematical Functions</title> + <titleabbrev>Math.</titleabbrev> + <partintro> + <sect1 id="math.intro"> + <title>ìê°</title> + <para> + ì´ ìí í¨ìë ë¹ì ì»´í¨í°ì long ê³¼ double íì ë²ì ìììë§ ê°ë¤ì ë¤ë£¬ë¤. + ë§ì½ ë í° ì를 ë¤ë£¨ê³ ì íë¤ë©´ <link linkend="ref.bc">arbitrary precision math functions</link> 를 ë³´ë¼. + </para> + <sect2 id="math.constants"> + <title>Math constants</title> + <para> + ë¤ìì ê°ë¤ì PHPìì math extensionì ìí´ ì ìë ìì ì´ë¤.: + <table> + <title>Math constants</title> + <tgroup cols="3"> + <thead> + <row> + <entry>ìì</entry> + <entry>ê°</entry> + <entry>ì¤ëª </entry> + </row> + </thead> + <tbody> + <row> + <entry>M_PI</entry> + <entry>3.14159265358979323846</entry> + <entry>Pi</entry> + </row> + <row> + <entry>M_E</entry> + <entry>2.7182818284590452354</entry> + <entry>e</entry> + </row> + <row> + <entry>M_LOG2E</entry> + <entry>1.4426950408889634074</entry> + <entry>log_2 e</entry> + </row> + <row> + <entry>M_LOG10E</entry> + <entry>0.43429448190325182765</entry> + <entry>log_10 e</entry> + </row> + <row> + <entry>M_LN2</entry> + <entry>0.69314718055994530942</entry> + <entry>log_e 2</entry> + </row> + <row> + <entry>M_LN10</entry> + <entry>2.30258509299404568402</entry> + <entry>log_e 10</entry> + </row> + <row> + <entry>M_PI_2</entry> + <entry>1.57079632679489661923</entry> + <entry>pi/2</entry> + </row> + <row> + <entry>M_PI_4</entry> + <entry>0.78539816339744830962</entry> + <entry>pi/4</entry> + </row> + <row> + <entry>M_1_PI</entry> + <entry>0.31830988618379067154</entry> + <entry>1/pi</entry> + </row> + <row> + <entry>M_2_PI</entry> + <entry>0.63661977236758134308</entry> + <entry>2/pi</entry> + </row> + <row> + <entry>M_SQRTPI</entry> + <entry>1.77245385090551602729</entry> + <entry>sqrt(pi) [4.0.2]</entry> + </row> + <row> + <entry>M_2_SQRTPI</entry> + <entry>1.12837916709551257390</entry> + <entry>2/sqrt(pi)</entry> + </row> + <row> + <entry>M_SQRT2</entry> + <entry>1.41421356237309504880</entry> + <entry>sqrt(2)</entry> + </row> + <row> + <entry>M_SQRT3</entry> + <entry>1.73205080756887729352</entry> + <entry>sqrt(3) [4.0.2]</entry> + </row> + <row> + <entry>M_SQRT1_2</entry> + <entry>0.70710678118654752440</entry> + <entry>1/sqrt(2)</entry> + </row> + <row> + <entry>M_LNPI</entry> + <entry>1.14472988584940017414</entry> + <entry>log_e(pi) [4.0.2]</entry> + </row> + <row> + <entry>M_EULER</entry> + <entry>0.57721566490153286061</entry> + <entry>Euler constant [4.0.2]</entry> + </row> + </tbody> + </tgroup> + </table> + PHP4RC1 ê¹ì§ë ë¨ì§ M_PI ë§ì´ ì ì©íë©°, ë¤ë¥¸ 모ë ììë¤ì + PHP 4.0. ì´íì ê°ë¥íë¤. + [4.0.2]ë¼ë ë¼ë²¨ì´ ë¶ì ììë PHP 4.0.2. ìì ì¶ê°ë ììì´ë¤. + </para> + </sect2> + </sect1> + </partintro> + <refentry id="function.abs"> + <refnamediv> + <refname>abs</refname> + <refpurpose>ì ëê°</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>abs</function> + </funcdef> + <paramdef>mixed <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ì«ìì ì ëê°ì ë°ííë¤. + ì¸ìë¡ ì¨ ì«ìê° float íì´ë©´ ë°í íì ë ìì float ì´ë©°, ì´ë ë¤ë¥¸ íì ëí´ìë ëì¼íë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.acos"> + <refnamediv> + <refname>acos</refname> + <refpurpose>ìí¬ ì½ì¬ì¸(Arc cosine)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>acos</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ìí¬ ì½ì¬ì¸(Arc cosine) ê°ì ë¼ëì¸ì¼ë¡ ë°ííë¤. + </para> + <para> + <function>asin</function> ê·¸ë¦¬ê³ <function>atan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.asin"> + <refnamediv> + <refname>asin</refname> + <refpurpose>ìí¬ ì¬ì¸(Arc sine)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>asin</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ìí¬ ì¬ì¸(Arc sine) ë¼ëì¸ì¼ë¡ ê°ì ë°ííë¤. + </para> + <para> + <function>acos</function> ê·¸ë¦¬ê³ <function>atan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.atan"> + <refnamediv> + <refname>atan</refname> + <refpurpose>ìí¬ íì í¸(Arc tangent)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>atan</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ìí¬ íì í¸(Arc tangent)ê°ì ë¼ëì¸ì¼ë¡ ë°ííë¤. + </para> + <para> + <function>asin</function> ê·¸ë¦¬ê³ <function>acos</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.atan2"> + <refnamediv> + <refname>atan2</refname> + <refpurpose>ë ë³ìì ìí¬ íì í¸(arc tangent)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>atan2</function> + </funcdef> + <paramdef>float <parameter>y</parameter> + </paramdef> + <paramdef>float <parameter>x</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + ì´ í¨ìë ë ë³ì <parameter>x</parameter> ì <parameter>y</parameter>ì + ìí¬ íì í¸(arc tangent) ê°ì ë°ííë¤. + ì´ë ê° ì¸ìë¤ì ë¶í¸ê° ê²°ê³¼ì 4ë¶êµ¬ê°ì ê²°ì íëë° ì¬ì©ëë¤ë ì ì ì ì¸íê³ ë + <parameter>y</parameter> / <parameter>x</parameter>ì + ìí¬ íì í¸ ê°ì ê³ì°íë ê²ê³¼ ëì¼íë¤. + </simpara> + <simpara> + ì´ í¨ìë ê²°ê³¼ë ë¼ëìì¼ë¡ ë°ííëë° ê·¸ ë²ìë -PI ë³´ë¤ í¬ê±°ë ê°ê³ + PI ë³´ë¤ ìê±°ë ê°ì ê°ì ë²ìê° ëë¤. + </simpara> + <para> + <function>acos</function> ê·¸ë¦¬ê³ <function>atan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.base-convert"> + <refnamediv> + <refname>base_convert</refname> + <refpurpose>ììì ë² ì´ì¤(arbitrary bases) ì¬ì´ìì ì«ì를 ë³ííë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>base_convert</function> + </funcdef> + <paramdef>string <parameter>number</parameter> + </paramdef> + <paramdef>int <parameter>frombase</parameter> + </paramdef> + <paramdef>int <parameter>tobase</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>number</parameter>ì í´ë¹íë 문ìì´ + <parameter>tobase</parameter> ë² ì´ì¤ë¡ ë°ê¾¸ì´ ë°ííë¤. + <parameter>number</parameter>ì ë² ì´ì¤ë + <parameter>frombase</parameter>ìì ëª ìëë¤. + <parameter>frombase</parameter> ì <parameter>tobase</parameter>ë + ë ë¤ 2 ë³´ë¤ í¬ê±°ë ê°ê³ 36 ë³´ë¤ ìê±°ë ê°ì ê°ì´ ìì¼ íë¤. + 10 ë³´ë¤ í° ì«ì(digit) aìì z ê¹ì§ì 문ìë¡ ëíë´ë©°, + a ë 10ì bë 11ì ê·¸ë¦¬ê³ zë 35ì í´ë¹íë ì«ì를 ëíë¸ë¤. + <example> + <title> + <function>Base_convert</function> + </title> + <programlisting role="php"> +$binary = base_convert ($hexadecimal, 16, 2); +</programlisting> + </example> + </para> + </refsect1> + </refentry> + <refentry id="function.bindec"> + <refnamediv> + <refname>bindec</refname> + <refpurpose>2ì§ì를 10ì§ìë¡ ë°ê¾¼ë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>bindec</function> + </funcdef> + <paramdef>string <parameter>binary_string</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 2ì§ ë¬¸ìì´ ì ìí´ ííëë 2ì§ì를 ëì¼í 10ì§ìë¡ ë°ííë¤. + </para> + <para> + bindec ë 2ì§ì를 10ì§ìë¡ ë³ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë 1ì 31ë¹í¸(1111111111111111111111111111111), + ìì§ìë¡ 2147483647 ì´ë¤. + </para> + <para> + <function>decbin</function> í¨ì를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.ceil"> + <refnamediv> + <refname>ceil</refname> + <refpurpose>ì¬ë¦¼íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ceil</function> + </funcdef> + <paramdef>float <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>number</parameter>ë³´ë¤ í¬ê±°ë ê°ì ê°ì¥ í° ì ì를 ë°ííë¤.(ì¬ë¦¼) + ì ìì <function>ceil</function>를 ì°ë ê²ì ìê° ëë¹ì¼ ë¿ì´ë¤. + <informalexample> + <programlisting role="php"> +$x = ceil(4.25); +// $x=5 ì ê°ì ê°ëë¤. + </programlisting> + </informalexample> + </para> + <simpara> + 주ì: PHP/FI 2 ì <function>ceil</function> í¨ìë float íì ë°ííë¤. + ì¬ì©: PHP/FI 2 ì 결과를 ì»ê¸° ìí´ <literal>$new = (double)ceil($number);</literal> 를 ì¬ì©íë¼. + </simpara> + <simpara> + <function>floor</function> ê·¸ë¦¬ê³ + <function>round</function>를 ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.cos"> + <refnamediv> + <refname>cos</refname> + <refpurpose>ì½ì¬ì¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>cos</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + argì ì½ì¬ì¸ ê°ì ë¼ëìì¼ë¡ ë°ííë¤. + </para> + <para> + See also <function>sin</function> and <function>tan</function>. + </para> + </refsect1> + </refentry> + <refentry id="function.decbin"> + <refnamediv> + <refname>decbin</refname> + <refpurpose>10ì§ì를 2ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>decbin</function> + </funcdef> + <paramdef>int <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 주ì´ì§ ì«ì를 2ì§ííì í¬í¨íë 문ìì´ë¡ ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë ìì§ìë¡ 2147483647 ì´ë¯ë¡ + ê²°ê³¼ë 1ì 31ë¹í¸(1111111111111111111111111111111)ê° ëë¤. + </para> + <para> + <function>bindec</function> í¨ì를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.dechex"> + <refnamediv> + <refname>dechex</refname> + <refpurpose>10ì§ì를 16ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>dechex</function> + </funcdef> + <paramdef>int <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 주ì´ì§ ì«ì를 16ì§ì를 íííë 문ìì´ë¡ ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë ìì§ìë¡ 2147483647ì´ë¯ë¡ + ê²°ê³¼ë 16ì§ìë¡ "7fffffff" ê° ëë¤. + </para> + <para> + See also the <function>hexdec</function> function. + </para> + </refsect1> + </refentry> + <refentry id="function.decoct"> + <refnamediv> + <refname>decoct</refname> + <refpurpose>ìì§ì를 8ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>decoct</function> + </funcdef> + <paramdef>int <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 주ì´ì§ ì«ì를 8ì§ì ííë¡ íííë 문ìì´ì ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ìë ìì§ìë¡ 2147483647ì´ë©° + ê²°ê³¼ë "17777777777" ì´ ëë¤. + </para> + <para> + <function>octdec</function>를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.deg2rad"> + <refnamediv> + <refname>deg2rad</refname> + <refpurpose> + ê°ë(degree)를 ëì¼í ë¼ëì ê°ì¼ë¡ ë³ííë¤. + </refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>deg2rad</function> + </funcdef> + <paramdef>double <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ì´ í¨ìë <parameter>number</parameter>를 ê°ë(degree)ìì ëì¼í ë¼ëì ê°ì¼ë¡ ë³ííë¤. + </para> + <para> + <function>rad2deg</function>를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.exp"> + <refnamediv> + <refname>exp</refname> + <refpurpose>e ì ì¹ì</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>exp</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + e(2.718...)ì <parameter>arg</parameter>ì¹ì ë°ííë¤. + </para> + <para> + <function>pow</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.floor"> + <refnamediv> + <refname>floor</refname> + <refpurpose>ê°ì ë´ë¦¼íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>floor</function> + </funcdef> + <paramdef>float <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <parameter>number</parameter>ë³´ë¤ ìê±°ë ê°ì ê°ì¥ ìì ì ì를 ë°ííë¤. + <function>floor</function>ì ì ì를 ì¬ì©íë ê²ì ìê° ëë¹ì¼ ë¿ì´ë¤. + </simpara> + <simpara> + 주ì : PHP/FI 2 ìì <function>floor</function>ë float íì ë°ííë¤. + ì´ ë²ì ¼ì í¨ê³¼ë¥¼ ë´ê¸° ìí´ <literal>$new = (double)floor($number);</literal>를 ì¬ì©íë¼. + </simpara> + <simpara> + <function>ceil</function> ê·¸ë¦¬ê³ + <function>round</function>를 ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.getrandmax"> + <refnamediv> + <refname>getrandmax</refname> + <refpurpose>ê°ë¥í ê°ì¥ í° ììì´ ê°ì ë³´ì¬ì¤ë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>getrandmax</function> + </funcdef> + <paramdef>void </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>rand</function> í¨ìì í¸ì¶ì ìí´ ë°ì ì ìë ê°ì¥ í° ê°ì ë°ííë¤. + </simpara> + <simpara> + <function>rand</function>, <function>srand</function>, + <function>mt_rand</function>, <function>mt_srand</function>, ê·¸ë¦¬ê³ + <function>mt_getrandmax</function>ì ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.hexdec"> + <refnamediv> + <refname>hexdec</refname> + <refpurpose>16ì§ì를 10ì§ìë¡ ë³ííë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>hexdec</function> + </funcdef> + <paramdef>string <parameter>hex_string</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 16ì§ì ì«ìì í´ë¹íë 10ì§ì ê°ì 10ì§ì ííë¡ ë°ííë¤. + HecDecë 16ì§ì 문ìì´ì 10ì§ì 문ìì´ë¡ ë³ííë©°, + ë³íë ì ìë ê°ì¥ í° ìë 7fffffff ì´ê±°ë 10ì§ìë¡ 2147483647 ì´ë¤. + </para> + <para> + <function>dechex</function>í¨ì를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.lcg-value"> + <refnamediv> + <refname>lcg_value</refname> + <refpurpose>Combined linear congruential generator</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>lcg_value</function> + </funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + <function>lcg_value</function>ë (0, 1) ì¬ì´ì ìì¬ ëë¤ ì«ì(pseudo number)를 ë°ííë¤. + ì´ í¨ìë 2^31 - 85 ì 2^31 - 249 ì¬ì´ì ëê°ì CG를 ì¡°í©íë¤. + ì´ í¨ìì 구ê°ì ë ììì ì°ë¬¼ê³¼ ì¼ì¹íë¤. + (The period of this function is equal to the product of both primes.) + </para> + </refsect1> + </refentry> + <refentry id="function.log"> + <refnamediv> + <refname>log</refname> + <refpurpose>ìì°ë¡ê·¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>log</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + argì ìì°ë¡ê·¸ë¥¼ ë°ííë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.log10"> + <refnamediv> + <refname>log10</refname> + <refpurpose>ìì©ë¡ê·¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>log10</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì ì¬ì©ë¡ê·¸ ê°ì ë°ííë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.max"> + <refnamediv> + <refname>max</refname> + <refpurpose>ê°ì¥ í° ê°ì ì°¾ëë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>max</function> + </funcdef> + <paramdef>mixed <parameter>arg1</parameter> + </paramdef> + <paramdef>mixed <parameter>arg2</parameter> + </paramdef> + <paramdef>mixed <parameter>argn</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>max</function>ë ë§¤ê° ë³ìì ê° ì¤ ì«ìë¡ íìëë ê°ì¥ í° ê°ì ë°ííë¤. + </para> + <para> + ì²ì 매ê°ë³ìê° ë°°ì´ì´ë¼ë©´, <function>max</function>ë + ê·¸ ë°°ì´ì ìë ê° ì¤ ê°ì¥ í° ê°ì ë°ííë¤. + ì²ì 매ê°ë³ìê° ì ì, 문ìì´ í¹ì ëë¸íì´ë¼ë©´, + ìµìí ëê°ì ë§¤ê° ë³ìê° íìíë©°, <function>max</function> ë + ì´ ê°ë¤ ì¤ ê°ì¥ í° ê°ì ë°ííë¤. + ë¹êµëë ê°ë¤ì ìë 무ì¬íì´ë¤. + </para> + <para> + íë í¹ì ê·¸ ì´ìì ê°ì´ ëë¸íì´ë¼ë©°ë 모ë ê°ì ëë¸íì¼ë¡ ì¬ê²¨ì§ë©°, + ëë¸íì´ ë°íëë¤. + ì´ëê² íëë ëë¸íì´ ìëë©´, 모ë ê²ì´ ì ìë¡ ì¬ê²¨ì§ë©°, ì ìíì´ ë°íëë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.min"> + <refnamediv> + <refname>min</refname> + <refpurpose>ê°ì¥ ìì ê°ì ì°¾ëë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>min</function> + </funcdef> + <paramdef>mixed <parameter>arg1</parameter> + </paramdef> + <paramdef>mixed <parameter>arg2</parameter> + </paramdef> + <paramdef>mixed <parameter>argn</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>Min</function>ë 매ê°ë³ìì ê° ì¤ ì«ìë¡ íìëë ê°ì¥ ìì ê°ì ë°ííë¤. + </para> + <para> + ì²ì 매ê°ë³ìê° ë°°ì´ì´ë¼ë©´, <function>min</function>ì + ê·¸ ë°°ì´ì ìë ê° ì¤ ê°ì¥ ìì ê°ì ë°ííë¤. + ì²ì 매ê°ë³ìê° ì ì, 문ìì´ í¹ì ëë¸íì´ë¼ë©´, + ìµìí ëê°ì ë§¤ê° ë³ìê° íìíë©°, <function>min</function>ì + ì´ ê°ë¤ ì¤ ê°ì¥ ìì ê°ì ë°ííë¤. + ë¹êµëë ê°ë¤ì ìë 무ì¬íì´ë¤. + </para> + <para> + íë í¹ì ê·¸ ì´ìì ê°ì´ ëë¸íì´ë¼ë©°ë 모ë ê°ì ëë¸íì¼ë¡ ì¬ê²¨ì§ë©°, + ëë¸íì´ ë°íëë¤. + ì´ëê² íëë ëë¸íì´ ìëë©´, 모ë ê²ì´ ì ìë¡ ì¬ê²¨ì§ë©°, ì ìíì´ ë°íëë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.mt-rand"> + <refnamediv> + <refname>mt_rand</refname> + <refpurpose>ë ì¢ì ëë¤ê°ì ìì±íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mt_rand</function> + </funcdef> + <paramdef>int + <parameter> + <optional>min</optional> + </parameter> + </paramdef> + <paramdef>int + <parameter> + <optional>max</optional> + </parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + ìì libcì ë§ì ëì ìì±ê¸°ë 모í¸íê±°ë í¹ì + unknown characteristics를 ê°ê³ ìì¼ë©° ë리ë¤. + 기본ì ì¼ë¡ PHPì <function>rand</function>í¨ìë + libc ëì ìì±ê¸°ë¥¼ ì¬ì©íë¤. + <function>mt_rand</function> í¨ìë ì´ë¥¼ ìí + ëë¡-ì¸ êµì²´(drop-in replacement) ì´ë¤. + ì´ í¨ìë ëì ë°ìê¸°ë¡ known characteristics를 ì¬ì©íë©°, + Many random number generators of older libcs have or + unknown characteristics and are slow. By default, PHP uses the + libc random number generator with the <function>rand</function> + function. <function>mt_rand</function> function is a drop-in + replacement for this. It uses a random number generator with + known characteristics, the Mersenne Twister, which will produce + random numbers that should be suitable for seeding some kinds + of cryptography (see the home pages for details) and is four + times faster than what the average libc provides. The Homepage + of the Mersenne Twister can be found at + <ulink url="&url.mersenne;">&url.mersenne;</ulink>, and an + optimized version of the MT source is available from + <ulink url="&url.mersenne.twister;">&url.mersenne.twister; + </ulink>. + </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> + <simpara> + Remember to seed the random number generator before use with + <function>mt_srand</function>. + </simpara> + <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>, <function>srand</function>, + <function>rand</function> and <function>getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.mt-srand"> + <refnamediv> + <refname>mt_srand</refname> + <refpurpose>Seed the better random number generator</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>mt_srand</function> + </funcdef> + <paramdef>int <parameter>seed</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + Seeds the random number generator with + <parameter>seed</parameter>. + <informalexample> + <programlisting role="php"> +// seed with microseconds since last "whole" second +mt_srand ((double) microtime() * 1000000); +$randval = mt_rand(); + </programlisting> + </informalexample> + </para> + <simpara> + See also <function>mt_rand</function>, + <function>mt_getrandmax</function>, <function>srand</function>, + <function>rand</function>, and + <function>getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.mt-getrandmax"> + <refnamediv> + <refname>mt_getrandmax</refname> + <refpurpose>ê°ì¥ í° ëë¤ê°ì ë³´ì¬ì¤ë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mt_getrandmax</function> + </funcdef> + <paramdef>void </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>mt_rand</function>ì í¸ì¶ì ìí´ ë°íë ì ìë ê°ì¥ í° ê°ì ë°ííë¤. + </simpara> + <simpara> + <function>mt_rand</function>, + <function>mt_srand</function> + <function>rand</function>, + <function>srand</function>, ê·¸ë¦¬ê³ + <function>getrandmax</function>ì ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.number-format"> + <refnamediv> + <refname>number_format</refname> + <refpurpose>ì«ì를 ì²ë¨ìë¡ ë¬¶ì´ì íííë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>number_format</function> + </funcdef> + <paramdef>float <parameter>number</parameter> + </paramdef> + <paramdef>int <parameter>decimals</parameter> + </paramdef> + <paramdef>string <parameter>dec_point</parameter> + </paramdef> + <paramdef>string <parameter>thousands_sep</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>Number_format</function>ì <parameter>number</parameter>ì ì ííë íí 를 ë°ííë¤. + ì´ í¨ìë íë, ëê° í¹ì ë¤ê°(ì¸ê°ë ì¬ ì ìë¤.)ì 매ê°ë³ì를 ê°ì§ ì ìë¤. + </para> + <para> + íëì 매ê°ë³ìë§ ì£¼ì´ì§ë©´, ê·¸ë¥ ì«ìê° ìë 매 ì²ë¨ìë§ë¤ 콤ë§(",")를 ê°ì§ ííê° ë°íëë¤. + (ìì주:ìì ì´íì리ë ë°ì¬ë¦¼ ëë¤.) + </para> + <para> + ëê°ì 매ê°ë³ìê° ì£¼ì´ì§ë©´, <parameter>number</parameter>ë + <parameter>decimals</parameter>ì리 ììì ì ê°ì§ê³ ì²ë¨ìë§ë¤ 콤ë§(",")ê° + ë¶ì ííê° ë°íëë¤. + </para> + <para> + 매ê°ë³ì 4ê°ê° 주ì´ì§ë©´, <parameter>number</parameter>ë + <parameter>decimals</parameter>ì리ì ììì ì ê°ê³ , + dot(".") ëì <parameter>dec_point</parameter>ê° ëì²´ëë©°, + ì²ë¨ì ë§ë¤ ì¬ì© ë ì½¤ë§ (",") ëì <parameter>thousands_sep</parameter>ê° + ì ì©ë ííê° ë°íëë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.octdec"> + <refnamediv> + <refname>octdec</refname> + <refpurpose>8ì§ì를 10ì§ìë¡</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>octdec</function> + </funcdef> + <paramdef>string <parameter>octal_string</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + 8ì§ì ííë¡ ííëë octal_string ì¸ì를 ì´í´ í´ë¹íë 8ì§ìì ëë±í + 10ì§ìë¡ ë°ííë¤. + OctDecë 8ì§ì를 10ì§ìë¡ ë°ííë¤. + ë³íë ì ìë ê°ì¥ í° ê°ì 17777777777 í¹ì 10ì§ìë¡ 2147483647 ì´ë¤. + </para> + <para> + <function>decoct</function>를 ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.pi"> + <refnamediv> + <refname>pi</refname> + <refpurpose>íì´(pi)ê°ì ì»ëë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>pi</function> + </funcdef> + <paramdef>void </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + íì´(pi)ì ê·¼ì¬ê°ì ë°ííë¤. + </simpara> + </refsect1> + </refentry> + <refentry id="function.pow"> + <refnamediv> + <refname>pow</refname> + <refpurpose>ê±°ëì ê³±</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>pow</function> + </funcdef> + <paramdef>float <parameter>base</parameter> + </paramdef> + <paramdef>float <parameter>exp</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>base</parameter>ì <parameter>exp</parameter>ì¹ ê°ì ë°ííë¤. + </para> + <para> + <function>exp</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.rad2deg"> + <refnamediv> + <refname>rad2deg</refname> + <refpurpose> + ë¼ëìì ê°ëë¡ ë³ííë¤. + </refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>rad2deg</function> + </funcdef> + <paramdef>double <parameter>number</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ì´ í¨ìë <parameter>number</parameter>ì ë¼ëììì ê°ëë¡ ë³ííë¤. + </para> + <para> + <function>deg2rad</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.rand"> + <refnamediv> + <refname>rand</refname> + <refpurpose>ëì를 ë°ìíë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>rand</function> + </funcdef> + <paramdef> + <parameter> + <optional>int min</optional> + </parameter> + </paramdef> + <paramdef> + <parameter> + <optional>int max</optional> + </parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <parameter>min</parameter>ìì´ í¸ì¶ëë©´, + If called without the optional <parameter>min</parameter>, + <parameter>max</parameter> arguments <function>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>rand (5, + 15)</literal>. + </simpara> + <simpara> + Remember to seed the random number generator before use with + <function>srand</function>. + </simpara> + <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>, <function>mt_rand</function>, + <function>mt_srand</function>, and + <function>mt_getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.round"> + <refnamediv> + <refname>round</refname> + <refpurpose>ì¤ì를 ë°ì¬ë¦¼íë¤.</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>round</function> + </funcdef> + <paramdef>double <parameter>val</parameter> + </paramdef> + <paramdef>int + <parameter> + <optional>precision</optional> + </parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + ììì <parameter>precision</parameter> ì리(ììì ì´íì ì리ì)ê¹ì§ + <parameter>val</parameter>ì ë°ì¬ë¦¼íë¤. + <informalexample> + <programlisting role="php"> +$foo = round (3.4); // $foo == 3.0 +$foo = round (3.5); // $foo == 4.0 +$foo = round (3.6); // $foo == 4.0 + +$foo = round (1.95583, 2); // $foo == 1.96 + </programlisting> + </informalexample> + </para> + <note> + <simpara> + <parameter>precision</parameter> ë PHP 4 ììë§ ì ì©íë¤. + </simpara> + </note> + <simpara> + <function>ceil</function> ê·¸ë¦¬ê³ + <function>floor</function>ì ì°¸ê³ íë¼. + </simpara> + </refsect1> + </refentry> + <refentry id="function.sin"> + <refnamediv> + <refname>sin</refname> + <refpurpose>ì¬ì¸</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>sin</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + argì ì¬ì¸ê°ì ë¼ëìì¼ë¡ ë°ííë¤. + </para> + <para> + <function>cos</function> ê·¸ë¦¬ê³ <function>tan</function>ì ì°¸ê³ íë¼. + </para> + </refsect1> + </refentry> + <refentry id="function.sqrt"> + <refnamediv> + <refname>sqrt</refname> + <refpurpose>íë°©ì 곱근(루í¸)</refpurpose> + </refnamediv> + <refsect1> + <title>ì¤ëª </title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>sqrt</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <parameter>arg</parameter>ì íë°©ì 곱근ì ë°ííë¤. + </para> + </refsect1> + </refentry> + <refentry id="function.srand"> + <refnamediv> + <refname>srand</refname> + <refpurpose>Seed the random number generator</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>srand</function> + </funcdef> + <paramdef>int <parameter>seed</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + Seeds the random number generator with + <parameter>seed</parameter>. + <informalexample> + <programlisting role="php"> +// seed with microseconds since last "whole" second +srand ((double) microtime() * 1000000); +$randval = rand(); + </programlisting> + </informalexample> + </para> + <simpara> + See also <function>rand</function>, + <function>getrandmax</function>, <function>mt_rand</function>, + <function>mt_srand</function>, and + <function>mt_getrandmax</function>. + </simpara> + </refsect1> + </refentry> + <refentry id="function.tan"> + <refnamediv> + <refname>tan</refname> + <refpurpose>Tangent</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>float <function>tan</function> + </funcdef> + <paramdef>float <parameter>arg</parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + Returns the tangent of arg in radians. + </para> + <para> + See also <function>sin</function> and <function>cos</function>. + </para> + </refsect1> + </refentry> +</reference> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +-->