File tree Expand file tree Collapse file tree 7 files changed +23
-15
lines changed Expand file tree Collapse file tree 7 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 3232 <term ><parameter >scale</parameter ></term >
3333 <listitem >
3434 <simpara >
35- <parameter > scale</parameter > explicitly specified for calculation results.
36- If &null; , the <parameter > scale</parameter > of the calculation result will be set automatically.
35+ <property >BcMath\Number:: scale</property > explicitly specified for calculation results.
36+ If &null; , the <property >BcMath\Number:: scale</property > of the calculation result will be set automatically.
3737 </simpara >
3838 </listitem >
3939 </varlistentry >
Original file line number Diff line number Diff line change 2424 <listitem >
2525 <simpara >
2626 An <type >int</type > or <type >string</type > value.
27- If <parameter >num</parameter > is a <type >int</type >,
27+ If <parameter >num</parameter > is a <type >int</type >,
2828 the <property >BcMath\Number::scale</property > is always set to <literal >0</literal >.
2929 If <parameter >num</parameter > is a <type >string</type >, it must be a valid number,
3030 and the <property >BcMath\Number::scale</property > is automatically set by parsing the string.
Original file line number Diff line number Diff line change 4949 <literal >15</literal >.
5050 </simpara >
5151 <simpara >
52- Even in indivisible calculations, the <property >BcMath\Number::scale</property > will not always be
53- <literal >+10</literal >.
54- A <literal >0</literal > at the end of the result is considered not to need expansion, so the
55- <property >BcMath\Number::scale</property > is reduced by that amount.
56- The <property >BcMath\Number::scale</property > will never be less than the
57- <property >BcMath\Number::scale</property > before expansion.
58- See also the <link linkend =" bcmath-number.div.example.expansion-scale" >code example</link >.
52+ Even in indivisible calculations, the <property >BcMath\Number::scale</property > will not always be
53+ <literal >+10</literal >.
54+ A <literal >0</literal > at the end of the result is considered not to need expansion, so the
55+ <property >BcMath\Number::scale</property > is reduced by that amount.
56+ The <property >BcMath\Number::scale</property > will never be less than the
57+ <property >BcMath\Number::scale</property > before expansion.
58+ See also the <link linkend =" bcmath-number.div.example.expansion-scale" >code example</link >.
5959 </simpara >
6060 </refsect1 >
6161
Original file line number Diff line number Diff line change 4343 </simpara >
4444 </refsect1 >
4545
46+ <refsect1 role =" errors" >
47+ &reftitle.errors;
48+ <simpara >
49+ This method throws a <exceptionname >ValueError</exceptionname > if an invalid <parameter >mode</parameter > is specified.
50+ </simpara >
51+ </refsect1 >
52+
4653 <refsect1 role =" examples" >
4754 &reftitle.examples;
4855 <example >
Original file line number Diff line number Diff line change 3030 </simpara >
3131 <simpara >
3232 When the <property >BcMath\Number::scale</property > of the result object is automatically set,
33- the <property >BcMath\Number::scale</property > of this object is used. However, in cases such
33+ the <property >BcMath\Number::scale</property > of < varname >$ this</ varname > is used. However, in cases such
3434 as indivisible division, the <property >BcMath\Number::scale</property > of the result is expanded.
3535 Expansion is done only as needed, up to a maximum of <literal >+10</literal >.
36+ This behavior is the same as <methodname >BcMath\Number::div</methodname >, so please see that for details.
3637 </simpara >
3738 <simpara >
38- That is, if the <property >BcMath\Number::scale</property > of this object is <literal >5</literal >,
39+ That is, if the <property >BcMath\Number::scale</property > of < varname >$ this</ varname > is <literal >5</literal >,
3940 the <property >BcMath\Number::scale</property > of the result is between <literal >5</literal > and
4041 <literal >15</literal >.
4142 </simpara >
4647 <para >
4748 This method throws a <exceptionname >ValueError</exceptionname > in the following cases:
4849 <simplelist >
49- <member >This object is a negative value</member >
50+ <member >< varname >$this</ varname > is a negative value</member >
5051 <member ><parameter >scale</parameter > is outside the valid range</member >
5152 <member ><property >BcMath\Number::scale</property > of the result object is outside the valid range</member >
5253 </simplelist >
Original file line number Diff line number Diff line change 8484 <row >
8585 <entry >8.4.0</entry >
8686 <entry >
87- Negative powers of <literal >0</literal > previously returned 0 , but now throw a <exceptionname >DivisionByZeroError</exceptionname >
87+ Negative powers of <literal >0</literal > previously returned < literal >0</ literal > , but now throw a <exceptionname >DivisionByZeroError</exceptionname >
8888 exception.
8989 </entry >
9090 </row >
Original file line number Diff line number Diff line change 5151 This function throws a <exceptionname >ValueError</exceptionname > in the following cases:
5252 <simplelist >
5353 <member ><parameter >num</parameter > is not a well-formed BCMath numeric string.</member >
54- <member ><parameter >scale </parameter > is outside the valid range .</member >
54+ <member >An invalid <parameter >mode </parameter > is specified .</member >
5555 </simplelist >
5656 </para >
5757 </refsect1 >
You can’t perform that action at this time.
0 commit comments