Switched bcmath to the new doc style

# also moved a note before the example and removed unneeded screen tags


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165983 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2004-08-10 23:40:27 +00:00
parent 5a7d3c7d8f
commit 4e7662a15e
10 changed files with 130 additions and 122 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcadd">
<refnamediv>
@ -21,10 +21,12 @@
used to set the number of digits after the decimal place in the
result.
</para>
<para>
<example>
<title><function>bcadd</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcadd</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -36,11 +38,13 @@ echo bcadd($a, $b, 4); // 6.2340
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcsub</function>.
<function>bcsub</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bccomp">
<refnamediv>
@ -26,31 +26,23 @@
is less than the <parameter>right_operand</parameter> the return
value is -1.
</para>
<para>
<example>
<title><function>bccomp</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bccomp</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo bccomp('1', '2') . "\n";
echo bccomp('1.00001', '1', 3) . "\n";
echo bccomp('1.00001', '1', 5);
echo bccomp('1', '2') . "\n"; // -1
echo bccomp('1.00001', '1', 3); // 0
echo bccomp('1.00001', '1', 5); // 1
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
-1
0
1
]]>
</screen>
</example>
</para>
</programlisting>
</example>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcdiv">
<refnamediv>
@ -20,10 +20,12 @@
optional <parameter>scale</parameter> sets the number of digits
after the decimal place in the result.
</para>
<para>
<example>
<title><function>bcdiv</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcdiv</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -31,11 +33,13 @@ echo bcdiv(105, 6.55957, 3); // 16.007
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcmul</function>.
<function>bcmul</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcmod">
<refnamediv>
@ -19,30 +19,25 @@
Get the modulus of the <parameter>left_operand</parameter> using
<parameter>modulus</parameter>.
</para>
<para>
<example>
<title><function>bcmod</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcmod</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo bcmod(4, 2) . "\n";
echo bcmod(2, 4);
echo bcmod(4, 2); // 0
echo bcmod(2, 4); // 2
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
0
2
]]>
</screen>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcdiv</function>.
<function>bcdiv</function>.
</para>
</refsect1>
</refentry>
@ -66,4 +61,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcmul">
<refnamediv>
@ -20,30 +20,25 @@
optional <parameter>scale</parameter> sets the number of digits
after the decimal place in the result.
</para>
<para>
<example>
<title><function>bcmul</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcmul</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo bcmul(1.34747474747, 35, 3) . "\n";
echo bcmul(2, 4);
echo bcmul(1.34747474747, 35, 3); // 47.162
echo bcmul(2, 4); // 8
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
47.162
8
]]>
</screen>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcdiv</function>.
<function>bcdiv</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcpow">
<refnamediv>
@ -22,10 +22,12 @@
<parameter>scale</parameter> can be used to set the number of
digits after the decimal place in the result.
</para>
<para>
<example>
<title><function>bcpow</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcpow</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -33,11 +35,13 @@ echo bcpow(4.2, 3, 2); // 74.08
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcpowmod</function>, and
<function>bcpowmod</function>&listendand;
<function>bcsqrt</function>.
</para>
</refsect1>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcpowmod">
<refnamediv>
<refname>bcpowmod</refname>
@ -16,13 +16,23 @@
<methodparam><type>string</type><parameter>modulus</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam>
</methodsynopsis>
<simpara>
<para>
Use the fast-exponentiation method to raise <parameter>x</parameter>
to the power <parameter>y</parameter> with respect to the modulus
<parameter>modulus</parameter>. The optional
<parameter>scale</parameter> can be used to set the number of
digits after the decimal place in the result.
</simpara>
</para>
<note>
<para>
Because this method uses the modulus operation, non-natural numbers
may give unexpected results. A natural number is any positive
non-zero integer.
</para>
</note>
</refsect1>
<refsect1>
&reftitle.examples;
<para>
The following two statements are functionally identical. The
<function>bcpowmod</function> version however, executes in
@ -42,17 +52,11 @@ $b = bcmod(bcpow($x, $y), $mod);
</programlisting>
</informalexample>
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<note>
<simpara>
Because this method uses the modulus operation, non-natural numbers
may give unexpected results. A natural number is any positive
non-zero integer.
</simpara>
</note>
</para>
<para>
See also <function>bcpow</function>, and
<function>bcpow</function>&listendand;
<function>bcmod</function>.
</para>
</refsect1>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcscale">
<refnamediv>
@ -19,7 +19,9 @@
bc math functions that do not explicitly specify a scale
parameter. &return.success;
</para>
<para>
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcscale</function> example</title>
<programlisting role="php">

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcsqrt">
<refnamediv>
@ -20,10 +20,12 @@
The optional <parameter>scale</parameter> parameter sets the
number of digits after the decimal place in the result.
</para>
<para>
<example>
<title><function>bcsqrt</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcsqrt</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -31,11 +33,13 @@ echo bcsqrt(2, 3); // 1.414
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcpow</function>.
<function>bcpow</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcsub">
<refnamediv>
@ -23,10 +23,12 @@
used to set the number of digits after the decimal place in the
result.
</para>
<para>
<example>
<title><function>bcsub</function> example</title>
<programlisting role="php">
</refsect1>
<refsect1>
&reftitle.examples;
<example>
<title><function>bcsub</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -38,11 +40,13 @@ echo bcsub($a, $b, 4); // -3.7660
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
See also <function>bcadd</function>.
<function>bcadd</function>.
</para>
</refsect1>
</refentry>