From 57d7592159e523b08942ec0c1ff98a0c1a740799 Mon Sep 17 00:00:00 2001 From: Saki Takamachi Date: Tue, 17 Dec 2024 00:55:46 +0900 Subject: [PATCH] Moded a example code --- reference/bc/bcmath/number/div.xml | 76 +++++++++++++++--------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/reference/bc/bcmath/number/div.xml b/reference/bc/bcmath/number/div.xml index 8cd23522db15..26432822a848 100644 --- a/reference/bc/bcmath/number/div.xml +++ b/reference/bc/bcmath/number/div.xml @@ -55,44 +55,8 @@ BcMath\Number::scale is reduced by that amount. The BcMath\Number::scale will never be less than the BcMath\Number::scale before expansion. + See also the code example. - - Example of <property>BcMath\Number::scale</property> of result object - -div('10001'), - new BcMath\Number('0.001')->div('10001', 13), - new BcMath\Number('0.001')->div('100000000000001'), -); -?> -]]> - - &example.outputs; - - - string(13) "0.00000009999" - ["scale"]=> - int(11) -} -object(BcMath\Number)#3 (2) { - ["value"]=> - string(15) "0.0000000999900" - ["scale"]=> - int(13) -} -object(BcMath\Number)#4 (2) { - ["value"]=> - string(5) "0.000" - ["scale"]=> - int(3) -} -]]> - - @@ -201,6 +165,44 @@ object(BcMath\Number)#4 (2) { ["scale"]=> int(2) } +]]> + + + + + <methodname>BcMath\Number::div</methodname> example of expansioning <property>BcMath\Number::scale</property> of result object + +div('10001'), + new BcMath\Number('0.001')->div('10001', 13), + new BcMath\Number('0.001')->div('100000000000001'), +); +?> +]]> + + &example.outputs; + + + string(13) "0.00000009999" + ["scale"]=> + int(11) +} +object(BcMath\Number)#3 (2) { + ["value"]=> + string(15) "0.0000000999900" + ["scale"]=> + int(13) +} +object(BcMath\Number)#4 (2) { + ["value"]=> + string(5) "0.000" + ["scale"]=> + int(3) +} ]]>