didou Tue Dec 16 07:48:28 2003 EDT
Modified files:
/phpdoc/en/reference/bc/functions bcdiv.xml bcpow.xml bcscale.xml
bcsqrt.xml
Log:
some examples
Index: phpdoc/en/reference/bc/functions/bcdiv.xml
diff -u phpdoc/en/reference/bc/functions/bcdiv.xml:1.2
phpdoc/en/reference/bc/functions/bcdiv.xml:1.3
--- phpdoc/en/reference/bc/functions/bcdiv.xml:1.2 Wed Apr 17 02:36:33 2002
+++ phpdoc/en/reference/bc/functions/bcdiv.xml Tue Dec 16 07:48:28 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcdiv">
<refnamediv>
@@ -21,6 +21,20 @@
after the decimal place in the result.
</para>
<para>
+ <example>
+ <title><function>bcdiv</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+echo bcdiv(105, 6.55957, 3); // 16.007
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
See also <function>bcmul</function>.
</para>
</refsect1>
Index: phpdoc/en/reference/bc/functions/bcpow.xml
diff -u phpdoc/en/reference/bc/functions/bcpow.xml:1.5
phpdoc/en/reference/bc/functions/bcpow.xml:1.6
--- phpdoc/en/reference/bc/functions/bcpow.xml:1.5 Mon Mar 31 09:52:04 2003
+++ phpdoc/en/reference/bc/functions/bcpow.xml Tue Dec 16 07:48:28 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcpow">
<refnamediv>
@@ -12,7 +12,7 @@
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>bcpow</methodname>
- <methodparam><type>string</type><parameter>x</parameter></methodparam>
+ <methodparam><type>number</type><parameter>x</parameter></methodparam>
<methodparam><type>int</type><parameter>y</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>scale</parameter></methodparam>
</methodsynopsis>
@@ -23,6 +23,20 @@
digits after the decimal place in the result.
</para>
<para>
+ <example>
+ <title><function>bcpow</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+echo bcpow(4.2, 3, 2); // 74.08
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
See also <function>bcpowmod</function>, and
<function>bcsqrt</function>.
</para>
Index: phpdoc/en/reference/bc/functions/bcscale.xml
diff -u phpdoc/en/reference/bc/functions/bcscale.xml:1.2
phpdoc/en/reference/bc/functions/bcscale.xml:1.3
--- phpdoc/en/reference/bc/functions/bcscale.xml:1.2 Wed Apr 17 02:36:33 2002
+++ phpdoc/en/reference/bc/functions/bcscale.xml Tue Dec 16 07:48:28 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcscale">
<refnamediv>
@@ -19,6 +19,25 @@
bc math functions that do not explicitly specify a scale
parameter.
</para>
+ <para>
+ <example>
+ <title><function>bcscale</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+// default scale : 3
+bcscale(3);
+echo bcdiv(105, 6.55957); // 16.007
+
+// this is the same without bcscale()
+echo bcdiv(105, 6.55957, 3); // 16.007
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/bc/functions/bcsqrt.xml
diff -u phpdoc/en/reference/bc/functions/bcsqrt.xml:1.2
phpdoc/en/reference/bc/functions/bcsqrt.xml:1.3
--- phpdoc/en/reference/bc/functions/bcsqrt.xml:1.2 Wed Apr 17 02:36:34 2002
+++ phpdoc/en/reference/bc/functions/bcsqrt.xml Tue Dec 16 07:48:28 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
<refentry id="function.bcsqrt">
<refnamediv>
@@ -21,6 +21,20 @@
number of digits after the decimal place in the result.
</para>
<para>
+ <example>
+ <title><function>bcsqrt</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+echo bcsqrt(2, 3); // 1.414
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
See also <function>bcpow</function>.
</para>
</refsect1>