From f922f1a7e5c5f07c6bbacc4466ff0ab0329a2394 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sat, 9 Sep 2017 12:29:42 +0000 Subject: [PATCH] Improve documentation of bcpow() and bcpowmod() We clarify the meaning of $left_operand and $right_operand, and also document the supported values. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343026 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/bc/functions/bcpow.xml | 18 ++++++++++-------- reference/bc/functions/bcpowmod.xml | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/reference/bc/functions/bcpow.xml b/reference/bc/functions/bcpow.xml index e06658053c..0ef30df00d 100644 --- a/reference/bc/functions/bcpow.xml +++ b/reference/bc/functions/bcpow.xml @@ -10,13 +10,13 @@ &reftitle.description; stringbcpow - stringleft_operand - stringright_operand + stringbase + stringexponent intscale0 - Raise left_operand to the power - right_operand. + Raise base to the power + exponent. @@ -25,18 +25,20 @@ - left_operand + base - The left operand, as a string. + The base, as a string. - right_operand + exponent - The right operand, as a string. + The exponent, as a string. If the exponent is non-integral, it is truncated. + The valid range of the exponent is platform specific, but is at least + -2147483648 to 2147483647. diff --git a/reference/bc/functions/bcpowmod.xml b/reference/bc/functions/bcpowmod.xml index 36b605c51f..dad905c8ee 100644 --- a/reference/bc/functions/bcpowmod.xml +++ b/reference/bc/functions/bcpowmod.xml @@ -10,15 +10,15 @@ &reftitle.description; stringbcpowmod - stringleft_operand - stringright_operand + stringbase + stringexponent stringmodulus intscale0 Use the fast-exponentiation method to raise - left_operand to the power - right_operand with respect to the modulus + base to the power + exponent with respect to the modulus modulus. @@ -28,18 +28,18 @@ - left_operand + base - The left operand, as a string. + The base, as an integral string (i.e. the scale has to be zero). - right_operand + exponent - The right operand, as a string. + The exponent, as an non-negative, integral string (i.e. the scale has to be zero). @@ -47,7 +47,7 @@ modulus - The modulus, as a string. + The modulus, as an integral string (i.e. the scale has to be zero). @@ -60,7 +60,7 @@ &reftitle.returnvalues; Returns the result as a string, or &null; if modulus - is 0. + is 0 or exponent is negative.