cvs: phpdoc /en/functions math.xml

From: Date: Mon, 14 Jan 2002 09:45:56 +0000
Subject: cvs: phpdoc /en/functions math.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969341181@lists.php.net to get a copy of this message
philip Mon Jan 14 04:45:56 2002 EDT Modified files: /phpdoc/en/functions math.xml Log: pi: Document precicion directive's affect, as well as the M_PI constant. And, some other minor changes. Index: phpdoc/en/functions/math.xml diff -u phpdoc/en/functions/math.xml:1.67 phpdoc/en/functions/math.xml:1.68 --- phpdoc/en/functions/math.xml:1.67 Thu Jan 10 08:42:36 2002 +++ phpdoc/en/functions/math.xml Mon Jan 14 04:45:55 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.67 $ --> +<!-- $Revision: 1.68 $ --> <reference id="ref.math"> <title>Mathematical Functions</title> <titleabbrev>Math</titleabbrev> @@ -118,9 +118,9 @@ </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. + Only M_PI is available in PHP versions up to and including PHP 4.0.0. + All other constants are available starting with PHP 4.0.0. Constants + labeled [4.0.2] were added in PHP 4.0.2. </para> </sect2> </sect1> @@ -1177,14 +1177,19 @@ </funcprototype> </funcsynopsis> <simpara> - Returns an approximation of pi. + Returns an approximation of pi. The returned <type>float</type> + has a precision based on the + <link linkend="ini.precision">precision</link> directive in + <filename>php.ini</filename>, which defaults to <literal>14</literal>. + Also, you can use the <constant>M_PI</constant> constant which yields + identical results to <function>pi</function>. </simpara> <para> <informalexample> <programlisting> <![CDATA[ -echo pi(); -// will echo 3.1415926535898 +echo pi(); // 3.1415926535898 +echo M_PI; // 3.1415926535898 ]]> </programlisting> </informalexample>

« previous php.doc (#969341181) next »