cvs: phpdoc-zh /reference/math/functions mt-rand.xml mt-srand.xml octdec.xml pow.xml rad2deg.xml rand.xml round.xml sinh.xml sqrt.xml srand.xml
tanh.xml

From: Date: Wed, 12 Mar 2003 11:06:08 +0000
Subject: cvs: phpdoc-zh /reference/math/functions mt-rand.xml mt-srand.xml octdec.xml pow.xml rad2deg.xml rand.xml round.xml sinh.xml sqrt.xml srand.xml
tanh.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-1228@lists.php.net to get a copy of this message
dallas Wed Mar 12 06:06:08 2003 EDT Added files: /phpdoc-zh/reference/math/functions octdec.xml pow.xml rad2deg.xml rand.xml round.xml sinh.xml sqrt.xml srand.xml tanh.xml Modified files: /phpdoc-zh/reference/math/functions mt-rand.xml mt-srand.xml Log: Completed.

Index: phpdoc-zh/reference/math/functions/mt-rand.xml diff -u phpdoc-zh/reference/math/functions/mt-rand.xml:1.1 phpdoc-zh/reference/math/functions/mt-rand.xml:1.2 --- phpdoc-zh/reference/math/functions/mt-rand.xml:1.1 Wed Mar 12 05:37:01 2003 +++ phpdoc-zh/reference/math/functions/mt-rand.xml Wed Mar 12 06:06:07 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.mt-rand"> @@ -28,7 +28,7 @@ Èç¹ûûÓÐÌṩ¿ÉÑ¡²ÎÊý <parameter>min</parameter> ºÍ <parameter>max</parameter>£¬<function>mt_rand</function> ·µ»Ø 0 µ½ <constant>RAND_MAX</constant> - Ö»¼ûµÄÎ±Ëæ»úÊý¡£ÀýÈçÏëÒª 5 µ½ 15£¨°üÀ¨ 5 ºÍ 15£©Ö®¼äµÄËæ»úÊý£¬Óà + Ö®¼äµÄÎ±Ëæ»úÊý¡£ÀýÈçÏëÒª 5 µ½ 15£¨°üÀ¨ 5 ºÍ 15£©Ö®¼äµÄËæ»úÊý£¬Óà <literal>mt_rand(5, 15)</literal>¡£ </simpara> <simpara> Index: phpdoc-zh/reference/math/functions/mt-srand.xml diff -u phpdoc-zh/reference/math/functions/mt-srand.xml:1.1 phpdoc-zh/reference/math/functions/mt-srand.xml:1.2 --- phpdoc-zh/reference/math/functions/mt-srand.xml:1.1 Wed Mar 12 05:37:01 2003 +++ phpdoc-zh/reference/math/functions/mt-srand.xml Wed Mar 12 06:06:07 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.mt-srand"> @@ -32,7 +32,7 @@ </para> <note> <para> - ×Ô PHP 4.2.0 Æä²»ÔÙÐèÒªÔÚʹÓÃËæ»úÊý·¢ÉúÆ÷֮ǰ¸øÆä²¥ÖÖ¡£ + ×Ô PHP 4.2.0 Æð²»ÔÙÐèÒªÔÚʹÓÃËæ»úÊý·¢ÉúÆ÷֮ǰ¸øÆä²¥ÖÖ¡£ </para> </note> <simpara> Index: phpdoc-zh/reference/math/functions/octdec.xml +++ phpdoc-zh/reference/math/functions/octdec.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.octdec"> <refnamediv> <refname>octdec</refname> <refpurpose>°Ë½øÖÆ×ª»»ÎªÊ®½øÖÆ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>octdec</methodname> <methodparam><type>string</type><parameter>octal_string</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø <parameter>octal_string</parameter> ²ÎÊýËù±íʾµÄ°Ë½øÖÆÊýµÄÊ®½øÖƵÈÖµ¡£¿Éת»»µÄ×î´óµÄÊýֵΪ 17777777777 »òÊ®½øÖÆµÄ 2147483647¡£ </para> <para> ²Î¼û <function>decoct</function>¡£ </para> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/pow.xml +++ phpdoc-zh/reference/math/functions/pow.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.pow"> <refnamediv> <refname>pow</refname> <refpurpose>Ö¸Êý±í´ïʽ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>number</type><methodname>pow</methodname> <methodparam><type>number</type><parameter>base</parameter></methodparam> <methodparam><type>number</type><parameter>exp</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø <parameter>base</parameter> µÄ <parameter>exp</parameter> ´Î·½µÄÃÝ¡£Èç¹û¿ÉÄÜ£¬±¾º¯Êý»á·µ»Ø <type>integer</type>¡£ </para> <para> Èç¹û²»ÄܼÆËãÃÝ£¬½«·¢³öÒ»Ìõ¾¯¸æ£¬<function>pow</function> ½«·µ»Ø &false;¡£ </para> <example> <title><function>pow</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php var_dump( pow(2,8) ); // int(256) echo pow(-1,20); // 1 echo pow(0, 0); // 1 echo pow(-1, 5.5); // error ?> ]]> </programlisting> </example> <warning> <para> ÔÚ PHP 4.0.6 ¼°Ö®Ç°°æ±¾ÖУ¬<function>pow</function> ×ÜÊÇ·µ»Ø <type>float</type>£¬²¢ÇÒ²»²úÉú¾¯¸æ¡£ </para> </warning> <para> ²Î¼û <function>exp</function> ºÍ <function>sqrt</function>¡£ </para> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/rad2deg.xml +++ phpdoc-zh/reference/math/functions/rad2deg.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.rad2deg"> <refnamediv> <refname>rad2deg</refname> <refpurpose> ½«»¡¶ÈÊýת»»ÎªÏàÓ¦µÄ½Ç¶ÈÊý </refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>float</type><methodname>rad2deg</methodname> <methodparam><type>float</type><parameter>number</parameter></methodparam> </methodsynopsis> <para> ±¾º¯Êý½« <parameter>number</parameter> ´Ó»¡¶Èת»»Îª½Ç¶È¡£ </para> <para> ²Î¼û <function>deg2rad</function>¡£ </para> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/rand.xml +++ phpdoc-zh/reference/math/functions/rand.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.rand"> <refnamediv> <refname>rand</refname> <refpurpose>²úÉúÒ»¸öËæ»úÊý</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>rand</methodname> <methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam> <methodparam><type>int</type><parameter>max</parameter></methodparam> </methodsynopsis> <simpara> Èç¹ûûÓÐÌṩ¿ÉÑ¡²ÎÊý <parameter>min</parameter> ºÍ <parameter>max</parameter>£¬<function>rand</function> ·µ»Ø 0 µ½ <constant>RAND_MAX</constant> Ö®¼äµÄÎ±Ëæ»úÊý¡£ÀýÈçÏëÒª 5 µ½ 15£¨°üÀ¨ 5 ºÍ 15£©Ö®¼äµÄËæ»úÊý£¬Óà <literal>rand(5, 15)</literal>¡£ </simpara> <simpara> ÔÚ PHP ½ÏÔç°æ±¾ÖУ¬±ØÐëÔÚʹÓñ¾º¯Êý֮ǰµ÷Óà <function>srand</function> ²¥ÏÂËæ»úÊýÖÖ×Ó¡£×Ô 4.2.0 ²»ÔÙÐèÒªÕâÑù×öÁË¡£ </simpara> <note> <para> ÔÚ 3.0.7 ֮ǰµÄ°æ±¾ÖУ¬<parameter>max</parameter> µÄº¬ÒåÊÇ <parameter>range</parameter>¡£ÒªÔÚÕâЩ°æ±¾Öеõ½ºÍÉÏÀýÏàͬ 5 µ½ 15 µÄËæ»úÊý£¬¼ò¶ÌµÄÀý×ÓÊÇ <literal>rand (5, 11)</literal>¡£ </para> </note> <simpara> ²Î¼û <function>srand</function>£¬<function>getrandmax</function> ºÍ <function>mt_rand</function>¡£ </simpara> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/round.xml +++ phpdoc-zh/reference/math/functions/round.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.round"> <refnamediv> <refname>round</refname> <refpurpose>¶Ô¸¡µãÊý½øÐÐËÄÉáÎåÈë</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>float</type><methodname>round</methodname> <methodparam><type>float</type><parameter>val</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>precision</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø½« <parameter>val</parameter> ¸ù¾ÝÖ¸¶¨¾«¶È <parameter>precision</parameter>£¨Ê®½øÖÆÐ¡ÊýµãºóÊý×ÖµÄÊýÄ¿£©½øÐÐËÄÉáÎåÈëµÄ½á¹û¡£<parameter>precision</parameter> Ò²¿ÉÒÔÊǸºÊý»òÁ㣨ĬÈÏÖµ£©¡£ </para> <para> <caution> <simpara> PHP ĬÈϲ»ÄÜÕýÈ·´¦ÀíÀàËÆ <literal>"12,300.2"</literal> µÄ×Ö·û´®¡£¼û<link linkend="language.types.string.conversion">×Ö·û´®×ª»»ÎªÊýÖµ</link>¡£ </simpara> </caution> </para> <para> <informalexample> <programlisting role="php"> <![CDATA[ echo round(3.4); // 3 echo round(3.5); // 4 echo round(3.6); // 4 echo round(3.6, 0); // 4 echo round(1.95583, 2); // 1.96 echo round(1241757, -3); // 1242000 ]]> </programlisting> </informalexample> </para> <note> <simpara> <parameter>precision</parameter> ²ÎÊý½öÔÚ PHP 4 ÖпÉÓᣠ</simpara> </note> <simpara> ²Î¼û <function>ceil</function> ºÍ <function>floor</function>¡£ </simpara> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/sinh.xml +++ phpdoc-zh/reference/math/functions/sinh.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.sinh"> <refnamediv> <refname>sinh</refname> <refpurpose>Ë«ÇúÕýÏÒ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>float</type><methodname>sinh</methodname> <methodparam><type>float</type><parameter>arg</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø <parameter>arg</parameter> µÄË«ÇúÕýÏÒÖµ£¬¶¨ÒåΪ <literal>(exp(arg) - exp(-arg))/2</literal>¡£ </para> <para> ²Î¼û <function>sin</function>£¬<function>asinh</function>£¬<function>cos</function> ºÍ <function>tan</function>¡£ </para> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/sqrt.xml +++ phpdoc-zh/reference/math/functions/sqrt.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.sqrt"> <refnamediv> <refname>sqrt</refname> <refpurpose>ƽ·½¸ù</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>float</type><methodname>sqrt</methodname> <methodparam><type>float</type><parameter>arg</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø <parameter>arg</parameter> µÄƽ·½¸ù¡£ </para> <para> <informalexample> <programlisting> <![CDATA[ <?php // Precision depends on your precision directive echo sqrt(9); // 3 echo sqrt(10); // 3.16227766 ... ?> ]]> </programlisting> </informalexample> </para> <para> ²Î¼û <function>pow</function>¡£ </para> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/srand.xml +++ phpdoc-zh/reference/math/functions/srand.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.srand"> <refnamediv> <refname>srand</refname> <refpurpose>²¥ÏÂËæ»úÊý·¢ÉúÆ÷ÖÖ×Ó</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>void</type><methodname>srand</methodname> <methodparam><type>int</type><parameter>seed</parameter></methodparam> </methodsynopsis> <para> Óà <parameter>seed</parameter> ²¥ÏÂËæ»úÊý·¢ÉúÆ÷ÖÖ×Ó¡£ <informalexample> <programlisting role="php"> <![CDATA[ // seed with microseconds function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed()); $randval = rand(); ]]> </programlisting> </informalexample> </para> <note> <para> ×Ô PHP 4.2.0 Æð²»ÔÙÐèÒªÔÚʹÓÃËæ»úÊý·¢ÉúÆ÷֮ǰ¸øÆä²¥ÖÖ¡£ </para> </note> <simpara> ²Î¼û <function>rand</function>£¬<function>getrandmax</function> ºÍ <function>mt_srand</function>¡£ </simpara> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/math/functions/tanh.xml +++ phpdoc-zh/reference/math/functions/tanh.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.tanh"> <refnamediv> <refname>tanh</refname> <refpurpose>Ë«ÇúÕýÇÐ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>float</type><methodname>tanh</methodname> <methodparam><type>float</type><parameter>arg</parameter></methodparam> </methodsynopsis> <para> ·µ»Ø <parameter>arg</parameter> µÄË«ÇúÕýÇÐÖµ£¬¶¨ÒåΪ <literal>sinh(arg)/cosh(arg)</literal>¡£ </para> <para> ²Î¼û <function>tan</function>£¬<function>atanh</function>£¬<function>sin</function> ºÍ <function>cos</function>¡£ </para> </refsect1> </refentry> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.zh (#1228) next »