From d96c681407d10a81863d0953cbf1a1f881e71743 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Mon, 14 Jan 2002 09:45:55 +0000 Subject: [PATCH] pi: Document precicion directive's affect, as well as the M_PI constant. And, some other minor changes. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67736 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/math.xml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/functions/math.xml b/functions/math.xml index 1acfb6da52..24640209c2 100644 --- a/functions/math.xml +++ b/functions/math.xml @@ -1,5 +1,5 @@ - + Mathematical Functions Math @@ -118,9 +118,9 @@ - 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. @@ -1177,14 +1177,19 @@ $randval = mt_rand(); - Returns an approximation of pi. + Returns an approximation of pi. The returned float + has a precision based on the + precision directive in + php.ini, which defaults to 14. + Also, you can use the M_PI constant which yields + identical results to pi.