From d0aea108914e426113010607dbf631a8a0da0f86 Mon Sep 17 00:00:00 2001 From: Saki Takamachi Date: Wed, 27 Nov 2024 14:39:26 +0900 Subject: [PATCH 1/7] Fixed and added exception behavior. Also added a literal tag --- reference/bc/functions/bcadd.xml | 13 +++++++++++- reference/bc/functions/bcceil.xml | 11 ++++++++++ reference/bc/functions/bccomp.xml | 17 ++++++++++++--- reference/bc/functions/bcdiv.xml | 2 +- reference/bc/functions/bcfloor.xml | 11 ++++++++++ reference/bc/functions/bcmod.xml | 2 +- reference/bc/functions/bcmul.xml | 13 +++++++++++- reference/bc/functions/bcpow.xml | 2 +- reference/bc/functions/bcpowmod.xml | 32 +++++++++++++++++++++++++++-- reference/bc/functions/bcround.xml | 11 ++++++++++ reference/bc/functions/bcscale.xml | 10 ++++++++- reference/bc/functions/bcsub.xml | 13 +++++++++++- 12 files changed, 125 insertions(+), 12 deletions(-) diff --git a/reference/bc/functions/bcadd.xml b/reference/bc/functions/bcadd.xml index bf94baeb4630..d5f4626a6f92 100644 --- a/reference/bc/functions/bcadd.xml +++ b/reference/bc/functions/bcadd.xml @@ -51,7 +51,18 @@ The sum of the two operands, as a string. - + + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num1 or num2 is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.changelog; diff --git a/reference/bc/functions/bcceil.xml b/reference/bc/functions/bcceil.xml index d2e9be85e986..ae3bb052bcde 100644 --- a/reference/bc/functions/bcceil.xml +++ b/reference/bc/functions/bcceil.xml @@ -39,6 +39,17 @@ + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.examples; diff --git a/reference/bc/functions/bccomp.xml b/reference/bc/functions/bccomp.xml index 052c5d4f6718..cc9803a9253d 100644 --- a/reference/bc/functions/bccomp.xml +++ b/reference/bc/functions/bccomp.xml @@ -58,12 +58,23 @@ &reftitle.returnvalues; - Returns 0 if the two operands are equal, 1 if the + Returns 0 if the two operands are equal, 1 if the num1 is larger than the - num2, -1 otherwise. + num2, -1 otherwise. - + + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num1 or num2 is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.changelog; diff --git a/reference/bc/functions/bcdiv.xml b/reference/bc/functions/bcdiv.xml index 0abfdbe95e99..ca99467b847b 100644 --- a/reference/bc/functions/bcdiv.xml +++ b/reference/bc/functions/bcdiv.xml @@ -87,7 +87,7 @@ 8.0.0 - Dividing by 0 now throws a DivisionByZeroError exception instead of returning null. + Dividing by 0 now throws a DivisionByZeroError exception instead of returning null. diff --git a/reference/bc/functions/bcfloor.xml b/reference/bc/functions/bcfloor.xml index 8ed28a46e60b..49675d2ec186 100644 --- a/reference/bc/functions/bcfloor.xml +++ b/reference/bc/functions/bcfloor.xml @@ -39,6 +39,17 @@ + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.examples; diff --git a/reference/bc/functions/bcmod.xml b/reference/bc/functions/bcmod.xml index 2f5135d1772f..06a03bccb23c 100644 --- a/reference/bc/functions/bcmod.xml +++ b/reference/bc/functions/bcmod.xml @@ -89,7 +89,7 @@ 8.0.0 - Dividing by 0 now throws a DivisionByZeroError exception instead of returning null. + Dividing by 0 now throws a DivisionByZeroError exception instead of returning null. diff --git a/reference/bc/functions/bcmul.xml b/reference/bc/functions/bcmul.xml index d45351230b49..f9b5134f6f13 100644 --- a/reference/bc/functions/bcmul.xml +++ b/reference/bc/functions/bcmul.xml @@ -51,7 +51,18 @@ Returns the result as a string. - + + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num1 or num2 is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.changelog; diff --git a/reference/bc/functions/bcpow.xml b/reference/bc/functions/bcpow.xml index ca3d701cee44..a0cdc1d6a206 100644 --- a/reference/bc/functions/bcpow.xml +++ b/reference/bc/functions/bcpow.xml @@ -84,7 +84,7 @@ 8.4.0 - Negative powers of 0 previously returned 0, but now throw a DivisionByZeroError + Negative powers of 0 previously returned 0, but now throw a DivisionByZeroError exception. diff --git a/reference/bc/functions/bcpowmod.xml b/reference/bc/functions/bcpowmod.xml index 0d173eb0fdff..bae3a7c95eec 100644 --- a/reference/bc/functions/bcpowmod.xml +++ b/reference/bc/functions/bcpowmod.xml @@ -59,11 +59,27 @@ &reftitle.returnvalues; - Returns the result as a string, or &false; if modulus - is 0 or exponent is negative. + Returns the result as a string. + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num, exponent or modulus is not a well-formed BCMath numeric string + num, exponent or modulus has a fractional part + scale is outside the valid range + exponent is a negative value + + + + This function throws a DivisionByZeroError exception if modulus + is 0. + + + &reftitle.changelog; @@ -81,6 +97,18 @@ scale is now nullable. + + 8.0.0 + + Now throws a ValueError instead of returning &false; if exponent is a negative value. + + + + 8.0.0 + + Dividing by 0 now throws a DivisionByZeroError exception instead of returning &false;. + + diff --git a/reference/bc/functions/bcround.xml b/reference/bc/functions/bcround.xml index a5ffa6acaa3e..6959751f9572 100644 --- a/reference/bc/functions/bcround.xml +++ b/reference/bc/functions/bcround.xml @@ -45,6 +45,17 @@ + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.examples; diff --git a/reference/bc/functions/bcscale.xml b/reference/bc/functions/bcscale.xml index 62eb2580020f..051c14c2ce82 100644 --- a/reference/bc/functions/bcscale.xml +++ b/reference/bc/functions/bcscale.xml @@ -47,7 +47,15 @@ Returns the old scale when used as setter. Otherwise the current scale is returned. - + + + &reftitle.errors; + + This function throws a ValueError if scale + is outside the valid range. + + + &reftitle.changelog; diff --git a/reference/bc/functions/bcsub.xml b/reference/bc/functions/bcsub.xml index ecc777421020..e3c0baa0decf 100644 --- a/reference/bc/functions/bcsub.xml +++ b/reference/bc/functions/bcsub.xml @@ -51,7 +51,18 @@ The result of the subtraction, as a string. - + + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num1 or num2 is not a well-formed BCMath numeric string + scale is outside the valid range + + + + &reftitle.changelog; From a049989efa90c6fd94eb7feb7680c8747653984c Mon Sep 17 00:00:00 2001 From: Saki Takamachi Date: Thu, 28 Nov 2024 11:06:43 +0900 Subject: [PATCH 2/7] xi:include is now used for errors. --- reference/bc/functions/bccomp.xml | 4 +++- reference/bc/functions/bcdivmod.xml | 17 ++--------------- reference/bc/functions/bcfloor.xml | 13 ++----------- reference/bc/functions/bcmod.xml | 17 ++--------------- reference/bc/functions/bcmul.xml | 13 ++----------- reference/bc/functions/bcround.xml | 11 +---------- reference/bc/functions/bcsub.xml | 13 ++----------- 7 files changed, 14 insertions(+), 74 deletions(-) diff --git a/reference/bc/functions/bccomp.xml b/reference/bc/functions/bccomp.xml index cc9803a9253d..c047d008b23d 100644 --- a/reference/bc/functions/bccomp.xml +++ b/reference/bc/functions/bccomp.xml @@ -1,6 +1,6 @@ - + bccomp Compare two arbitrary precision numbers @@ -64,6 +64,8 @@ + + &reftitle.errors; diff --git a/reference/bc/functions/bcdivmod.xml b/reference/bc/functions/bcdivmod.xml index 76cd7c2b7684..363f2d7ba1da 100644 --- a/reference/bc/functions/bcdivmod.xml +++ b/reference/bc/functions/bcdivmod.xml @@ -1,6 +1,6 @@ - + bcdivmod Get the quotient and modulus of an arbitrary precision number @@ -51,20 +51,7 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range - - - - This function throws a DivisionByZeroError exception if num2 - is 0. - - + &reftitle.examples; diff --git a/reference/bc/functions/bcfloor.xml b/reference/bc/functions/bcfloor.xml index 49675d2ec186..1ea12b0dd101 100644 --- a/reference/bc/functions/bcfloor.xml +++ b/reference/bc/functions/bcfloor.xml @@ -1,6 +1,6 @@ - + bcfloor Round down arbitrary precision number @@ -39,16 +39,7 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num is not a well-formed BCMath numeric string - scale is outside the valid range - - - + &reftitle.examples; diff --git a/reference/bc/functions/bcmod.xml b/reference/bc/functions/bcmod.xml index 06a03bccb23c..0b1100582c56 100644 --- a/reference/bc/functions/bcmod.xml +++ b/reference/bc/functions/bcmod.xml @@ -1,6 +1,6 @@ - + bcmod Get modulus of an arbitrary precision number @@ -54,20 +54,7 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range - - - - This function throws a DivisionByZeroError exception if num2 - is 0. - - + &reftitle.changelog; diff --git a/reference/bc/functions/bcmul.xml b/reference/bc/functions/bcmul.xml index f9b5134f6f13..b2c64d50bcee 100644 --- a/reference/bc/functions/bcmul.xml +++ b/reference/bc/functions/bcmul.xml @@ -1,6 +1,6 @@ - + bcmul Multiply two arbitrary precision numbers @@ -52,16 +52,7 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range - - - + &reftitle.changelog; diff --git a/reference/bc/functions/bcround.xml b/reference/bc/functions/bcround.xml index 6959751f9572..4c6de0198722 100644 --- a/reference/bc/functions/bcround.xml +++ b/reference/bc/functions/bcround.xml @@ -45,16 +45,7 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num is not a well-formed BCMath numeric string - scale is outside the valid range - - - + &reftitle.examples; diff --git a/reference/bc/functions/bcsub.xml b/reference/bc/functions/bcsub.xml index e3c0baa0decf..b05a384f16cd 100644 --- a/reference/bc/functions/bcsub.xml +++ b/reference/bc/functions/bcsub.xml @@ -1,6 +1,6 @@ - + bcsub Subtract one arbitrary precision number from another @@ -52,16 +52,7 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range - - - + &reftitle.changelog; From 92105bc1742852b20aeab0150fab71a51b08e329 Mon Sep 17 00:00:00 2001 From: Saki Takamachi Date: Thu, 28 Nov 2024 11:09:28 +0900 Subject: [PATCH 3/7] Since bcceil and bcfloor do not have a scale parameter, the errors item was corrected. --- reference/bc/functions/bcceil.xml | 11 ++++------- reference/bc/functions/bcround.xml | 11 ++++++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/reference/bc/functions/bcceil.xml b/reference/bc/functions/bcceil.xml index ae3bb052bcde..18d549ea59fb 100644 --- a/reference/bc/functions/bcceil.xml +++ b/reference/bc/functions/bcceil.xml @@ -41,13 +41,10 @@ &reftitle.errors; - - This function throws a ValueError in the following cases: - - num is not a well-formed BCMath numeric string - scale is outside the valid range - - + + This function throws a ValueError if num is not + a well-formed BCMath numeric string. + diff --git a/reference/bc/functions/bcround.xml b/reference/bc/functions/bcround.xml index 4c6de0198722..6959751f9572 100644 --- a/reference/bc/functions/bcround.xml +++ b/reference/bc/functions/bcround.xml @@ -45,7 +45,16 @@ - + + &reftitle.errors; + + This function throws a ValueError in the following cases: + + num is not a well-formed BCMath numeric string + scale is outside the valid range + + + &reftitle.examples; From 4e3239f1130dc1a6ccb12beee9cc156d77f03c85 Mon Sep 17 00:00:00 2001 From: Saki Takamachi Date: Thu, 28 Nov 2024 11:12:21 +0900 Subject: [PATCH 4/7] Forgetting to delete Errors/Exceptions --- reference/bc/functions/bccomp.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/reference/bc/functions/bccomp.xml b/reference/bc/functions/bccomp.xml index c047d008b23d..a74684212021 100644 --- a/reference/bc/functions/bccomp.xml +++ b/reference/bc/functions/bccomp.xml @@ -66,17 +66,6 @@ - - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range - - - - &reftitle.changelog; From 46d83cb84f692cc229887a7a7d8169fcfd7b6d3c Mon Sep 17 00:00:00 2001 From: Saki Takamachi Date: Fri, 29 Nov 2024 11:41:51 +0900 Subject: [PATCH 5/7] fixed pow and powmod --- reference/bc/functions/bcpow.xml | 2 +- reference/bc/functions/bcpowmod.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/bc/functions/bcpow.xml b/reference/bc/functions/bcpow.xml index a0cdc1d6a206..71ec11020ba6 100644 --- a/reference/bc/functions/bcpow.xml +++ b/reference/bc/functions/bcpow.xml @@ -60,8 +60,8 @@ This function throws a ValueError in the following cases: num or exponent is not a well-formed BCMath numeric string - scale is outside the valid range exponent has a fractional part + exponent or scale is outside the valid range diff --git a/reference/bc/functions/bcpowmod.xml b/reference/bc/functions/bcpowmod.xml index bae3a7c95eec..24690801bf50 100644 --- a/reference/bc/functions/bcpowmod.xml +++ b/reference/bc/functions/bcpowmod.xml @@ -70,8 +70,8 @@ num, exponent or modulus is not a well-formed BCMath numeric string num, exponent or modulus has a fractional part - scale is outside the valid range exponent is a negative value + scale is outside the valid range From 7d578c9b656003b5dbdd4ec01e2b501e7fa74f86 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Fri, 29 Nov 2024 15:21:40 +0000 Subject: [PATCH 6/7] Bunch of XIncludes and rewording --- language-snippets.ent | 16 ++++++---- reference/bc/functions/bcadd.xml | 9 ++++-- reference/bc/functions/bcceil.xml | 4 +-- reference/bc/functions/bccomp.xml | 45 +++++------------------------ reference/bc/functions/bcdiv.xml | 27 +++++++---------- reference/bc/functions/bcdivmod.xml | 21 +------------- reference/bc/functions/bcfloor.xml | 12 +------- reference/bc/functions/bcmod.xml | 26 ++--------------- reference/bc/functions/bcmul.xml | 32 ++++---------------- reference/bc/functions/bcsqrt.xml | 6 ++-- reference/bc/functions/bcsub.xml | 30 +++---------------- 11 files changed, 54 insertions(+), 174 deletions(-) diff --git a/language-snippets.ent b/language-snippets.ent index fcf2afe88160..99c9f636d950 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -2149,11 +2149,17 @@ extensions in order to use these functions.'> SQL safe mode'> - -scaleThis optional parameter is used to set the number -of digits after the decimal place in the result. If omitted, it will default to the scale set -globally with the bcscale function, or fallback to 0 if -this has not been set.'> + + scale + + + This parameter is used to set the number of digits after the decimal place in the result. + If &null;, it will default to the default scale set with bcscale, + or fallback to the value of the + bcmath.scale INI directive. + + +'> diff --git a/reference/bc/functions/bcadd.xml b/reference/bc/functions/bcadd.xml index d5f4626a6f92..01fb8a0d95d7 100644 --- a/reference/bc/functions/bcadd.xml +++ b/reference/bc/functions/bcadd.xml @@ -57,8 +57,13 @@ This function throws a ValueError in the following cases: - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range + + num1 or num2 + is not a well-formed BCMath numeric string + + + scale is outside the valid range + diff --git a/reference/bc/functions/bcceil.xml b/reference/bc/functions/bcceil.xml index 18d549ea59fb..1f326182733d 100644 --- a/reference/bc/functions/bcceil.xml +++ b/reference/bc/functions/bcceil.xml @@ -42,8 +42,8 @@ &reftitle.errors; - This function throws a ValueError if num is not - a well-formed BCMath numeric string. + This function throws a ValueError if + num is not a well-formed BCMath numeric string. diff --git a/reference/bc/functions/bccomp.xml b/reference/bc/functions/bccomp.xml index a74684212021..437effb2a9fe 100644 --- a/reference/bc/functions/bccomp.xml +++ b/reference/bc/functions/bccomp.xml @@ -15,53 +15,22 @@ intnullscale&null; - Compares the num1 to the - num2 and returns the result as an - integer. + Compares num1 to num2 + and returns the result of the comparison as an integer. - &reftitle.parameters; - - - - num1 - - - The left operand, as a string. - - - - - num2 - - - The right operand, as a string. - - - - - scale - - - The optional scale parameter is used to set the - number of digits after the decimal place which will be used in the - comparison. - - - - - + &reftitle.returnvalues; - - Returns 0 if the two operands are equal, 1 if the - num1 is larger than the + + Returns 0 if both operands are equal, + 1 if num1 is greater than num2, -1 otherwise. - + diff --git a/reference/bc/functions/bcdiv.xml b/reference/bc/functions/bcdiv.xml index ca99467b847b..bd293ebd4cee 100644 --- a/reference/bc/functions/bcdiv.xml +++ b/reference/bc/functions/bcdiv.xml @@ -1,6 +1,6 @@ - + bcdiv Divide two arbitrary precision numbers @@ -14,10 +14,9 @@ stringnum2 intnullscale&null; - - Divides the num1 by the - num2. - + + Divides num1 by num2. + @@ -53,17 +52,11 @@ - &reftitle.errors; - - This function throws a ValueError in the following cases: - - num1 or num2 is not a well-formed BCMath numeric string - scale is outside the valid range - - + + - This function throws a DivisionByZeroError exception if num2 - is 0. + This function throws a DivisionByZeroError + exception if num2 is 0. @@ -87,7 +80,9 @@ 8.0.0 - Dividing by 0 now throws a DivisionByZeroError exception instead of returning null. + Dividing by 0 now throws a + DivisionByZeroError exception + instead of returning &null;. diff --git a/reference/bc/functions/bcdivmod.xml b/reference/bc/functions/bcdivmod.xml index 363f2d7ba1da..e079ff7a950a 100644 --- a/reference/bc/functions/bcdivmod.xml +++ b/reference/bc/functions/bcdivmod.xml @@ -21,26 +21,7 @@ - &reftitle.parameters; - - - num1 - - - The dividend, as a string. - - - - - num2 - - - The divisor, as a string. - - - - &bc.scale.description; - + diff --git a/reference/bc/functions/bcfloor.xml b/reference/bc/functions/bcfloor.xml index 1ea12b0dd101..61b8c73410de 100644 --- a/reference/bc/functions/bcfloor.xml +++ b/reference/bc/functions/bcfloor.xml @@ -19,17 +19,7 @@ - &reftitle.parameters; - - - num - - - The value to round. - - - - + diff --git a/reference/bc/functions/bcmod.xml b/reference/bc/functions/bcmod.xml index 0b1100582c56..3bad43f5c793 100644 --- a/reference/bc/functions/bcmod.xml +++ b/reference/bc/functions/bcmod.xml @@ -17,34 +17,12 @@ Get the remainder of dividing num1 by num2. - Unless num2 is zero, the result has the same sign - as num1. + The result has the same sign as num1. - &reftitle.parameters; - - - - num1 - - - The dividend, as a string. - - - - - num2 - - - The divisor, as a string. - - - - &bc.scale.description; - - + diff --git a/reference/bc/functions/bcmul.xml b/reference/bc/functions/bcmul.xml index b2c64d50bcee..215e64b02220 100644 --- a/reference/bc/functions/bcmul.xml +++ b/reference/bc/functions/bcmul.xml @@ -14,35 +14,13 @@ stringnum2 intnullscale&null; - - Multiply the num1 by the - num2. - + + Multiply num1 by num2. + - &reftitle.parameters; - - - - num1 - - - The left operand, as a string. - - - - - num2 - - - The right operand, as a string. - - - - &bc.scale.description; - - + @@ -102,7 +80,7 @@ echo bcmul('2', '4'); // 8 &reftitle.notes; - Before PHP 7.3.0 bcmul may return a result with fewer digits after the + Prior to PHP 7.3.0 bcmul may return a result with fewer digits after the decimal point than the scale parameter would indicate. This only occurs when the result doesn't require all of the precision allowed by the scale. For example: diff --git a/reference/bc/functions/bcsqrt.xml b/reference/bc/functions/bcsqrt.xml index 4da28a897f1d..1564638a58b9 100644 --- a/reference/bc/functions/bcsqrt.xml +++ b/reference/bc/functions/bcsqrt.xml @@ -13,9 +13,9 @@ stringnum intnullscale&null; - - Return the square root of the num. - + + Return the square root of num. + diff --git a/reference/bc/functions/bcsub.xml b/reference/bc/functions/bcsub.xml index b05a384f16cd..adb4c1b8972c 100644 --- a/reference/bc/functions/bcsub.xml +++ b/reference/bc/functions/bcsub.xml @@ -14,35 +14,13 @@ stringnum2 intnullscale&null; - - Subtracts the num2 from the - num1. - + + Subtracts num2 from num1. + - &reftitle.parameters; - - - - num1 - - - The left operand, as a string. - - - - - num2 - - - The right operand, as a string. - - - - &bc.scale.description; - - + From a586f49e6272e64ff8d8826887ba401af1f96f2d Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Sun, 1 Dec 2024 12:49:49 +0000 Subject: [PATCH 7/7] Nits Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com> --- language-snippets.ent | 4 ++-- reference/bc/functions/bcadd.xml | 4 ++-- reference/bc/functions/bcmul.xml | 2 +- reference/bc/functions/bcround.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/language-snippets.ent b/language-snippets.ent index 99c9f636d950..14f6039c656d 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -2152,12 +2152,12 @@ extensions in order to use these functions.'> scale - + This parameter is used to set the number of digits after the decimal place in the result. If &null;, it will default to the default scale set with bcscale, or fallback to the value of the bcmath.scale INI directive. - + '> diff --git a/reference/bc/functions/bcadd.xml b/reference/bc/functions/bcadd.xml index 01fb8a0d95d7..5b5a475de04a 100644 --- a/reference/bc/functions/bcadd.xml +++ b/reference/bc/functions/bcadd.xml @@ -59,10 +59,10 @@ num1 or num2 - is not a well-formed BCMath numeric string + is not a well-formed BCMath numeric string. - scale is outside the valid range + scale is outside the valid range. diff --git a/reference/bc/functions/bcmul.xml b/reference/bc/functions/bcmul.xml index 215e64b02220..1557d195e39a 100644 --- a/reference/bc/functions/bcmul.xml +++ b/reference/bc/functions/bcmul.xml @@ -80,7 +80,7 @@ echo bcmul('2', '4'); // 8 &reftitle.notes; - Prior to PHP 7.3.0 bcmul may return a result with fewer digits after the + Prior to PHP 7.3.0, bcmul may return a result with fewer digits after the decimal point than the scale parameter would indicate. This only occurs when the result doesn't require all of the precision allowed by the scale. For example: diff --git a/reference/bc/functions/bcround.xml b/reference/bc/functions/bcround.xml index 6959751f9572..3b5e4de88c1a 100644 --- a/reference/bc/functions/bcround.xml +++ b/reference/bc/functions/bcround.xml @@ -50,8 +50,8 @@ This function throws a ValueError in the following cases: - num is not a well-formed BCMath numeric string - scale is outside the valid range + num is not a well-formed BCMath numeric string. + scale is outside the valid range.