Skip to content

Commit df1678d

Browse files
committed
sync with en
php/doc-en@ddb05f8
1 parent 622a4fc commit df1678d

File tree

11 files changed

+168
-124
lines changed

11 files changed

+168
-124
lines changed

language-snippets.ent

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,8 +2181,18 @@ PECL 拡張モジュールのインストール</link> という章にありま
21812181
</listitem></varlistentry>'>
21822182

21832183
<!-- BCMath Notes -->
2184-
<!ENTITY bc.scale.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>scale</parameter></term><listitem>
2185-
<para>このオプションパラメータを使用して、結果の小数点以下の桁数を指定します。省略した場合は、<function>bcscale</function> 関数でグローバルに設定した桁数をデフォルトとして使用します。それも設定されていない場合は <literal>0</literal> を使用します。</para></listitem></varlistentry>'>
2184+
<!-- to be translated -->
2185+
<!ENTITY bc.scale.description '<varlistentry xmlns="http://docbook.org/ns/docbook">
2186+
<term><parameter>scale</parameter></term>
2187+
<listitem>
2188+
<simpara>
2189+
This parameter is used to set the number of digits after the decimal place in the result.
2190+
If &null;, it will default to the default scale set with <function>bcscale</function>,
2191+
or fallback to the value of the
2192+
<link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link> INI directive.
2193+
</simpara>
2194+
</listitem>
2195+
</varlistentry>'>
21862196

21872197
<!-- CTYPE Notes -->
21882198
<!ENTITY note.ctype.parameter.integer '<note xmlns="http://docbook.org/ns/docbook"><para>

reference/bc/functions/bcadd.xml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 23f5599c8cc2713e7a4fdc29d8cceab66c341c48 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: hirokawa Status: working -->
44
<!-- CREDITS: takagi -->
55
<refentry xml:id="function.bcadd" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -54,6 +54,23 @@
5454
</para>
5555
</refsect1>
5656

57+
<!-- to be translated -->
58+
<refsect1 role="errors">
59+
&reftitle.errors;
60+
<para>
61+
This function throws a <exceptionname>ValueError</exceptionname> in the following cases:
62+
<simplelist>
63+
<member>
64+
<parameter>num1</parameter> or <parameter>num2</parameter>
65+
is not a well-formed BCMath numeric string.
66+
</member>
67+
<member>
68+
<parameter>scale</parameter> is outside the valid range.
69+
</member>
70+
</simplelist>
71+
</para>
72+
</refsect1>
73+
5774
<refsect1 role="changelog">
5875
&reftitle.changelog;
5976
<informaltable>

reference/bc/functions/bccomp.xml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 23f5599c8cc2713e7a4fdc29d8cceab66c341c48 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi -->
5-
<refentry xml:id="function.bccomp" xmlns="http://docbook.org/ns/docbook">
5+
<refentry xml:id="function.bccomp" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bccomp</refname>
88
<refpurpose>2 つの任意精度数値を比較する</refpurpose>
@@ -19,52 +19,25 @@
1919
<para>
2020
<parameter>num1</parameter> と
2121
<parameter>num2</parameter> を比較し、
22-
結果を整数値で返します
22+
比較結果を整数値で返します
2323
</para>
2424
</refsect1>
2525

2626
<refsect1 role="parameters">
27-
&reftitle.parameters;
28-
<para>
29-
<variablelist>
30-
<varlistentry>
31-
<term><parameter>num1</parameter></term>
32-
<listitem>
33-
<para>
34-
左オペランドを表す文字列。
35-
</para>
36-
</listitem>
37-
</varlistentry>
38-
<varlistentry>
39-
<term><parameter>num2</parameter></term>
40-
<listitem>
41-
<para>
42-
右オペランドを表す文字列。
43-
</para>
44-
</listitem>
45-
</varlistentry>
46-
<varlistentry>
47-
<term><parameter>scale</parameter></term>
48-
<listitem>
49-
<para>
50-
オプションの <parameter>scale</parameter> パラメータで、
51-
小数点以下の桁数を指定します。ここまでを使用して比較を行います。
52-
</para>
53-
</listitem>
54-
</varlistentry>
55-
</variablelist>
56-
</para>
27+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='parameters']/*)" />
5728
</refsect1>
5829

5930
<refsect1 role="returnvalues">
6031
&reftitle.returnvalues;
6132
<para>
62-
ふたつのオペランドが等しければ 0
33+
ふたつのオペランドが等しければ <literal>0</literal>
6334
<parameter>num1</parameter> が <parameter>num2</parameter>
64-
より大きければ戻り値は 1、小さければ -1 を返します。
35+
より大きければ戻り値は <literal>1</literal>、小さければ <literal>-1</literal> を返します。
6536
</para>
6637
</refsect1>
6738

39+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='errors'])" />
40+
6841
<refsect1 role="changelog">
6942
&reftitle.changelog;
7043
<informaltable>

reference/bc/functions/bcdiv.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 4754397753fd79f1c846868b66a2448babab1c54 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: hirokawa Status: working -->
44
<!-- CREDITS: takagi,mumumu -->
5-
<refentry xml:id="function.bcdiv" xmlns="http://docbook.org/ns/docbook">
5+
<refentry xml:id="function.bcdiv" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bcdiv</refname>
88
<refpurpose>2つの任意精度数値で除算を行う</refpurpose>
@@ -51,11 +51,20 @@
5151
&reftitle.returnvalues;
5252
<para>
5353
除算結果を文字列で返します。
54-
<parameter>num2</parameter> が 0
54+
<parameter>num2</parameter> が <literal>0</literal>
5555
の場合は &null; を返します。
5656
</para>
5757
</refsect1>
5858

59+
<refsect1 role="errors">
60+
<!-- Include standard ValueErrors for num1, num2, and scale, this includes the title -->
61+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='errors']/*)" />
62+
<simpara>
63+
This function throws a <exceptionname>DivisionByZeroError</exceptionname>
64+
exception if <parameter>num2</parameter> is <literal>0</literal>.
65+
</simpara>
66+
</refsect1>
67+
5968
<refsect1 role="changelog">
6069
&reftitle.changelog;
6170
<informaltable>

reference/bc/functions/bcmod.xml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 4754397753fd79f1c846868b66a2448babab1c54 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: hirokawa Status: working -->
44
<!-- CREDITS: takagi,mumumu -->
5-
<refentry xml:id="function.bcmod" xmlns="http://docbook.org/ns/docbook">
5+
<refentry xml:id="function.bcmod" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bcmod</refname>
88
<refpurpose>2 つの任意精度数値の剰余を取得する</refpurpose>
@@ -19,33 +19,12 @@
1919
<para>
2020
<parameter>num1</parameter> の、
2121
<parameter>num2</parameter> を法とする剰余を取得します。
22-
<parameter>num2</parameter> が 0でなければ、
2322
結果は <parameter>num1</parameter> と同じ符号を持ちます。
2423
</para>
2524
</refsect1>
2625

2726
<refsect1 role="parameters">
28-
&reftitle.parameters;
29-
<para>
30-
<variablelist>
31-
<varlistentry>
32-
<term><parameter>num1</parameter></term>
33-
<listitem>
34-
<para>
35-
被除数を表す文字列。
36-
</para>
37-
</listitem>
38-
</varlistentry>
39-
<varlistentry>
40-
<term><parameter>num2</parameter></term>
41-
<listitem>
42-
<para>
43-
割る数を表す文字列。
44-
</para>
45-
</listitem>
46-
</varlistentry>
47-
</variablelist>
48-
</para>
27+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='parameters']/*)" />
4928
</refsect1>
5029

5130
<refsect1 role="returnvalues">
@@ -56,6 +35,8 @@
5635
</para>
5736
</refsect1>
5837

38+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcdiv')/db:refsect1[@role='errors'])" />
39+
5940
<refsect1 role="changelog"><!-- {{{ -->
6041
&reftitle.changelog;
6142
<informaltable>
@@ -73,6 +54,12 @@
7354
<parameter>scale</parameter> は nullable になりました。
7455
</entry>
7556
</row>
57+
<row>
58+
<entry>8.0.0</entry>
59+
<entry>
60+
Dividing by <literal>0</literal> now throws a <exceptionname>DivisionByZeroError</exceptionname> exception instead of returning null.
61+
</entry>
62+
</row>
7663
<row>
7764
<entry>7.2.0</entry>
7865
<entry>

reference/bc/functions/bcmul.xml

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 23f5599c8cc2713e7a4fdc29d8cceab66c341c48 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
5-
<refentry xml:id="function.bcmul" xmlns="http://docbook.org/ns/docbook">
5+
<refentry xml:id="function.bcmul" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bcmul</refname>
88
<refpurpose>2つの任意精度数値の乗算を行う</refpurpose>
@@ -16,35 +16,14 @@
1616
<methodparam><type>string</type><parameter>num2</parameter></methodparam>
1717
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>scale</parameter><initializer>&null;</initializer></methodparam>
1818
</methodsynopsis>
19-
<para>
19+
<simpara>
2020
<parameter>num1</parameter> に
2121
<parameter>num2</parameter> を掛けます。
22-
</para>
22+
</simpara>
2323
</refsect1>
2424

2525
<refsect1 role="parameters">
26-
&reftitle.parameters;
27-
<para>
28-
<variablelist>
29-
<varlistentry>
30-
<term><parameter>num1</parameter></term>
31-
<listitem>
32-
<para>
33-
左オペランドを表す文字列。
34-
</para>
35-
</listitem>
36-
</varlistentry>
37-
<varlistentry>
38-
<term><parameter>num2</parameter></term>
39-
<listitem>
40-
<para>
41-
右オペランドを表す文字列。
42-
</para>
43-
</listitem>
44-
</varlistentry>
45-
&bc.scale.description;
46-
</variablelist>
47-
</para>
26+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='parameters']/*)" />
4827
</refsect1>
4928

5029
<refsect1 role="returnvalues">
@@ -54,6 +33,8 @@
5433
</para>
5534
</refsect1>
5635

36+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='errors'])" />
37+
5738
<refsect1 role="changelog"><!-- {{{ -->
5839
&reftitle.changelog;
5940
<informaltable>

reference/bc/functions/bcpow.xml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 23f5599c8cc2713e7a4fdc29d8cceab66c341c48 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: hirokawa Status: working -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -58,6 +58,22 @@
5858
</para>
5959
</refsect1>
6060

61+
<refsect1 role="errors">
62+
&reftitle.errors;
63+
<para>
64+
This function throws a <exceptionname>ValueError</exceptionname> in the following cases:
65+
<simplelist>
66+
<member><parameter>num</parameter> or <parameter>exponent</parameter> is not a well-formed BCMath numeric string</member>
67+
<member><parameter>exponent</parameter> has a fractional part</member>
68+
<member><parameter>exponent</parameter> or <parameter>scale</parameter> is outside the valid range</member>
69+
</simplelist>
70+
</para>
71+
<simpara>
72+
This function throws a <exceptionname>DivisionByZeroError</exceptionname> exception if <parameter>num</parameter>
73+
is <literal>0</literal> and <parameter>exponent</parameter> is a negative value.
74+
</simpara>
75+
</refsect1>
76+
6177
<refsect1 role="changelog"><!-- {{{ -->
6278
&reftitle.changelog;
6379
<informaltable>
@@ -69,6 +85,20 @@
6985
</row>
7086
</thead>
7187
<tbody>
88+
<row>
89+
<entry>8.4.0</entry>
90+
<entry>
91+
Negative powers of <literal>0</literal> previously returned 0, but now throw a <exceptionname>DivisionByZeroError</exceptionname>
92+
exception.
93+
</entry>
94+
</row>
95+
<row>
96+
<entry>8.0.0</entry>
97+
<entry>
98+
When <parameter>exponent</parameter> has a fractional part, it now throws a <exceptionname>ValueError</exceptionname>
99+
instead of truncating.
100+
</entry>
101+
</row>
72102
<row>
73103
<entry>7.3.0</entry>
74104
<entry>

reference/bc/functions/bcpowmod.xml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: cbac1ecf71d754707d69bdc344c4031c157eaa54 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: ddb05f8827151e25dd1c3e058f95f6c024bc881b Maintainer: takagi Status: working -->
44
<!-- Credits: mumumu -->
55
<refentry xml:id="function.bcpowmod" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -63,12 +63,27 @@
6363
<refsect1 role="returnvalues">
6464
&reftitle.returnvalues;
6565
<para>
66-
結果を文字列で返します。<parameter>modulus</parameter>
67-
が <literal>0</literal> の場合、
68-
または <parameter>exponent</parameter> が負の場合、&false; を返します。
66+
結果を文字列で返します。
6967
</para>
7068
</refsect1>
7169

70+
<refsect1 role="errors">
71+
&reftitle.errors;
72+
<para>
73+
This function throws a <exceptionname>ValueError</exceptionname> in the following cases:
74+
<simplelist>
75+
<member><parameter>num</parameter>, <parameter>exponent</parameter> or <parameter>modulus</parameter> is not a well-formed BCMath numeric string</member>
76+
<member><parameter>num</parameter>, <parameter>exponent</parameter> or <parameter>modulus</parameter> has a fractional part</member>
77+
<member><parameter>exponent</parameter> is a negative value</member>
78+
<member><parameter>scale</parameter> is outside the valid range</member>
79+
</simplelist>
80+
</para>
81+
<simpara>
82+
This function throws a <exceptionname>DivisionByZeroError</exceptionname> exception if <parameter>modulus</parameter>
83+
is <literal>0</literal>.
84+
</simpara>
85+
</refsect1>
86+
7287
<refsect1 role="changelog">
7388
&reftitle.changelog;
7489
<informaltable>
@@ -86,6 +101,18 @@
86101
<parameter>scale</parameter> は、nullable になりました。
87102
</entry>
88103
</row>
104+
<row>
105+
<entry>8.0.0</entry>
106+
<entry>
107+
Now throws a <exceptionname>ValueError</exceptionname> instead of returning &false; if <parameter>exponent</parameter> is a negative value.
108+
</entry>
109+
</row>
110+
<row>
111+
<entry>8.0.0</entry>
112+
<entry>
113+
Dividing by <literal>0</literal> now throws a <exceptionname>DivisionByZeroError</exceptionname> exception instead of returning &false;.
114+
</entry>
115+
</row>
89116
</tbody>
90117
</tgroup>
91118
</informaltable>

0 commit comments

Comments
 (0)