Author: jstephens
Date: 2008-04-25 17:22:37 +0200 (Fri, 25 Apr 2008)
New Revision: 10592
Log:
Fixes Docs Bug #36268 LOG() : "Arbitrary base"
Harmonise examples and correct example output
Note inverse functions in descriptions
Modified:
trunk/it/refman-5.1/functions-core.xml
trunk/pt/refman-5.1/functions-core.xml
trunk/refman-4.1/functions-core.xml
trunk/refman-5.0/functions-core.xml
trunk/refman-5.1/functions-core.xml
trunk/refman-6.0/functions-core.xml
Modified: trunk/it/refman-5.1/functions-core.xml
===================================================================
--- trunk/it/refman-5.1/functions-core.xml 2008-04-25 15:03:43 UTC (rev 10591)
+++ trunk/it/refman-5.1/functions-core.xml 2008-04-25 15:22:37 UTC (rev 10592)
Changed blocks: 6, Lines Added: 24, Lines Deleted: 5; 2957 bytes
@@ -6328,7 +6328,9 @@
<para>
Returns the value of <emphasis>e</emphasis> (the base of
natural logarithms) raised to the power of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. The inverse of this function
+ is <function role="sql">LOG()</function> (using a single
+ argument only) or <function role="sql">LN()</function>.
</para>
<remark role="help-description-end"/>
@@ -6450,7 +6452,9 @@
Returns the natural logarithm of
<replaceable>X</replaceable>; that is, the
base-<emphasis>e</emphasis> logarithm of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
<remark role="help-description-end"/>
@@ -6467,6 +6471,8 @@
<para>
This function is synonymous with
<function role="sql">LOG(<replaceable>X</replaceable>)</function>.
+ The inverse of this function is the
+ <function role="sql">EXP()</function> function.
</para>
</listitem>
@@ -6490,9 +6496,17 @@
<para>
If called with one parameter, this function returns the
- natural logarithm of <replaceable>X</replaceable>.
+ natural logarithm of <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
+ <para>
+ The inverse of this function (when called with a single
+ argument) is the <function role="sql">EXP()</function>
+ function.
+ </para>
+
<remark role="help-description-end"/>
<remark role="help-example"/>
@@ -6506,8 +6520,11 @@
<para>
If called with two parameters, this function returns the
- logarithm of <replaceable>X</replaceable> for an arbitrary
- base <replaceable>B</replaceable>.
+ logarithm of <replaceable>X</replaceable> to the base
+ <replaceable>B</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0, or
+ if <replaceable>B</replaceable> is less than or equal to 1,
+ then <literal>NULL</literal> is returned.
</para>
<programlisting>
@@ -6515,6 +6532,8 @@
-> 16
mysql> <userinput>SELECT LOG(10,100);</userinput>
-> 2
+mysql> <userinput>SELECT LOG(1,100);</userinput>
+ -> NULL
</programlisting>
<para>
Modified: trunk/pt/refman-5.1/functions-core.xml
===================================================================
--- trunk/pt/refman-5.1/functions-core.xml 2008-04-25 15:03:43 UTC (rev 10591)
+++ trunk/pt/refman-5.1/functions-core.xml 2008-04-25 15:22:37 UTC (rev 10592)
Changed blocks: 6, Lines Added: 24, Lines Deleted: 5; 2957 bytes
@@ -6328,7 +6328,9 @@
<para>
Returns the value of <emphasis>e</emphasis> (the base of
natural logarithms) raised to the power of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. The inverse of this function
+ is <function role="sql">LOG()</function> (using a single
+ argument only) or <function role="sql">LN()</function>.
</para>
<remark role="help-description-end"/>
@@ -6450,7 +6452,9 @@
Returns the natural logarithm of
<replaceable>X</replaceable>; that is, the
base-<emphasis>e</emphasis> logarithm of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
<remark role="help-description-end"/>
@@ -6467,6 +6471,8 @@
<para>
This function is synonymous with
<function role="sql">LOG(<replaceable>X</replaceable>)</function>.
+ The inverse of this function is the
+ <function role="sql">EXP()</function> function.
</para>
</listitem>
@@ -6490,9 +6496,17 @@
<para>
If called with one parameter, this function returns the
- natural logarithm of <replaceable>X</replaceable>.
+ natural logarithm of <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
+ <para>
+ The inverse of this function (when called with a single
+ argument) is the <function role="sql">EXP()</function>
+ function.
+ </para>
+
<remark role="help-description-end"/>
<remark role="help-example"/>
@@ -6506,8 +6520,11 @@
<para>
If called with two parameters, this function returns the
- logarithm of <replaceable>X</replaceable> for an arbitrary
- base <replaceable>B</replaceable>.
+ logarithm of <replaceable>X</replaceable> to the base
+ <replaceable>B</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0, or
+ if <replaceable>B</replaceable> is less than or equal to 1,
+ then <literal>NULL</literal> is returned.
</para>
<programlisting>
@@ -6515,6 +6532,8 @@
-> 16
mysql> <userinput>SELECT LOG(10,100);</userinput>
-> 2
+mysql> <userinput>SELECT LOG(1,100);</userinput>
+ -> NULL
</programlisting>
<para>
Modified: trunk/refman-4.1/functions-core.xml
===================================================================
--- trunk/refman-4.1/functions-core.xml 2008-04-25 15:03:43 UTC (rev 10591)
+++ trunk/refman-4.1/functions-core.xml 2008-04-25 15:22:37 UTC (rev 10592)
Changed blocks: 6, Lines Added: 32, Lines Deleted: 9; 3852 bytes
@@ -6199,7 +6199,11 @@
<para>
Returns the value of <emphasis>e</emphasis> (the base of
natural logarithms) raised to the power of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. The inverse of this function
+ is the <function role="sql">LOG()</function>. In MySQL 4.0.3
+ or later, its inverse is
+ <function role="sql">LOG()</function> using a single
+ argument or <function role="sql">LN()</function>.
</para>
<remark role="help-description-end"/>
@@ -6208,9 +6212,11 @@
<programlisting>
mysql> <userinput>SELECT EXP(2);</userinput>
- -> 7.389056
+ -> 7.3890560989307
mysql> <userinput>SELECT EXP(-2);</userinput>
- -> 0.135335
+ -> 0.13533528323661
+mysql> <userinput>SELECT EXP(0);</userinput>
+ -> 1
</programlisting>
</listitem>
@@ -6319,7 +6325,9 @@
Returns the natural logarithm of
<replaceable>X</replaceable>; that is, the
base-<emphasis>e</emphasis> logarithm of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
<remark role="help-description-end"/>
@@ -6328,7 +6336,7 @@
<programlisting>
mysql> <userinput>SELECT LN(2);</userinput>
- -> 0.693147
+ -> 0.69314718055995
mysql> <userinput>SELECT LN(-2);</userinput>
-> NULL
</programlisting>
@@ -6337,6 +6345,8 @@
This function was added in MySQL 4.0.3. It is synonymous
with
<function role="sql">LOG(<replaceable>X</replaceable>)</function>.
+ The inverse of this function is the
+ <function role="sql">EXP()</function> function.
</para>
</listitem>
@@ -6360,29 +6370,42 @@
<para>
If called with one parameter, this function returns the
- natural logarithm of <replaceable>X</replaceable>.
+ natural logarithm of <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
+ <para>
+ The inverse of this function (when called with a single
+ argument) is the <function role="sql">EXP()</function>
+ function.
+ </para>
+
<remark role="help-description-end"/>
<remark role="help-example"/>
<programlisting>
mysql> <userinput>SELECT LOG(2);</userinput>
- -> 0.693147
+ -> 0.69314718055995
mysql> <userinput>SELECT LOG(-2);</userinput>
-> NULL
</programlisting>
<para>
If called with two parameters, this function returns the
- logarithm of <replaceable>X</replaceable> for an arbitrary
- base <replaceable>B</replaceable>.
+ logarithm of <replaceable>X</replaceable> to the base
+ <replaceable>B</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0, or
+ if <replaceable>B</replaceable> is less than or equal to 1,
+ then <literal>NULL</literal> is returned.
</para>
<programlisting>
mysql> <userinput>SELECT LOG(2,65536);</userinput>
-> 16.000000
+mysql> <userinput>SELECT LOG(10,100);</userinput>
+ -> 2
mysql> <userinput>SELECT LOG(1,100);</userinput>
-> NULL
</programlisting>
Modified: trunk/refman-5.0/functions-core.xml
===================================================================
--- trunk/refman-5.0/functions-core.xml 2008-04-25 15:03:43 UTC (rev 10591)
+++ trunk/refman-5.0/functions-core.xml 2008-04-25 15:22:37 UTC (rev 10592)
Changed blocks: 6, Lines Added: 24, Lines Deleted: 5; 2947 bytes
@@ -6397,7 +6397,9 @@
<para>
Returns the value of <emphasis>e</emphasis> (the base of
natural logarithms) raised to the power of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. The inverse of this function
+ is <function role="sql">LOG()</function> (using a single
+ argumentonly) or <function role="sql">LN()</function>.
</para>
<remark role="help-description-end"/>
@@ -6519,7 +6521,9 @@
Returns the natural logarithm of
<replaceable>X</replaceable>; that is, the
base-<emphasis>e</emphasis> logarithm of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
<remark role="help-description-end"/>
@@ -6536,6 +6540,8 @@
<para>
This function is synonymous with
<function role="sql">LOG(<replaceable>X</replaceable>)</function>.
+ The inverse of this function is the
+ <function role="sql">EXP()</function> function.
</para>
</listitem>
@@ -6559,9 +6565,17 @@
<para>
If called with one parameter, this function returns the
- natural logarithm of <replaceable>X</replaceable>.
+ natural logarithm of <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
+ <para>
+ The inverse of this function (when called with a single
+ argument) is the <function role="sql">EXP()</function>
+ function.
+ </para>
+
<remark role="help-description-end"/>
<remark role="help-example"/>
@@ -6575,8 +6589,11 @@
<para>
If called with two parameters, this function returns the
- logarithm of <replaceable>X</replaceable> for an arbitrary
- base <replaceable>B</replaceable>.
+ logarithm of <replaceable>X</replaceable> to the base
+ <replaceable>B</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0, or
+ if <replaceable>B</replaceable> is less than or equal to 1,
+ then <literal>NULL</literal> is returned.
</para>
<programlisting>
@@ -6584,6 +6601,8 @@
-> 16
mysql> <userinput>SELECT LOG(10,100);</userinput>
-> 2
+mysql> <userinput>SELECT LOG(1,100);</userinput>
+ -> NULL
</programlisting>
<para>
Modified: trunk/refman-5.1/functions-core.xml
===================================================================
--- trunk/refman-5.1/functions-core.xml 2008-04-25 15:03:43 UTC (rev 10591)
+++ trunk/refman-5.1/functions-core.xml 2008-04-25 15:22:37 UTC (rev 10592)
Changed blocks: 6, Lines Added: 24, Lines Deleted: 5; 2948 bytes
@@ -6328,7 +6328,9 @@
<para>
Returns the value of <emphasis>e</emphasis> (the base of
natural logarithms) raised to the power of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. The inverse of this function
+ is <function role="sql">LOG()</function> (using a single
+ argument only) or <function role="sql">LN()</function>.
</para>
<remark role="help-description-end"/>
@@ -6450,7 +6452,9 @@
Returns the natural logarithm of
<replaceable>X</replaceable>; that is, the
base-<emphasis>e</emphasis> logarithm of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
<remark role="help-description-end"/>
@@ -6467,6 +6471,8 @@
<para>
This function is synonymous with
<function role="sql">LOG(<replaceable>X</replaceable>)</function>.
+ The inverse of this function is the
+ <function role="sql">EXP()</function> function.
</para>
</listitem>
@@ -6490,9 +6496,17 @@
<para>
If called with one parameter, this function returns the
- natural logarithm of <replaceable>X</replaceable>.
+ natural logarithm of <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
+ <para>
+ The inverse of this function (when called with a single
+ argument) is the <function role="sql">EXP()</function>
+ function.
+ </para>
+
<remark role="help-description-end"/>
<remark role="help-example"/>
@@ -6506,8 +6520,11 @@
<para>
If called with two parameters, this function returns the
- logarithm of <replaceable>X</replaceable> for an arbitrary
- base <replaceable>B</replaceable>.
+ logarithm of <replaceable>X</replaceable> to the base
+ <replaceable>B</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0, or
+ if <replaceable>B</replaceable> is less than or equal to 1,
+ then <literal>NULL</literal> is returned.
</para>
<programlisting>
@@ -6515,6 +6532,8 @@
-> 16
mysql> <userinput>SELECT LOG(10,100);</userinput>
-> 2
+mysql> <userinput>SELECT LOG(1,100);</userinput>
+ -> NULL
</programlisting>
<para>
Modified: trunk/refman-6.0/functions-core.xml
===================================================================
--- trunk/refman-6.0/functions-core.xml 2008-04-25 15:03:43 UTC (rev 10591)
+++ trunk/refman-6.0/functions-core.xml 2008-04-25 15:22:37 UTC (rev 10592)
Changed blocks: 6, Lines Added: 24, Lines Deleted: 5; 2948 bytes
@@ -6765,7 +6765,9 @@
<para>
Returns the value of <emphasis>e</emphasis> (the base of
natural logarithms) raised to the power of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. The inverse of this function
+ is <function role="sql">LOG()</function> (using a single
+ argument only) or <function role="sql">LN()</function>.
</para>
<remark role="help-description-end"/>
@@ -6887,7 +6889,9 @@
Returns the natural logarithm of
<replaceable>X</replaceable>; that is, the
base-<emphasis>e</emphasis> logarithm of
- <replaceable>X</replaceable>.
+ <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
<remark role="help-description-end"/>
@@ -6904,6 +6908,8 @@
<para>
This function is synonymous with
<function role="sql">LOG(<replaceable>X</replaceable>)</function>.
+ The inverse of this function is the
+ <function role="sql">EXP()</function> function.
</para>
</listitem>
@@ -6927,9 +6933,17 @@
<para>
If called with one parameter, this function returns the
- natural logarithm of <replaceable>X</replaceable>.
+ natural logarithm of <replaceable>X</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0,
+ then <literal>NULL</literal> is returned.
</para>
+ <para>
+ The inverse of this function (when called with a single
+ argument) is the <function role="sql">EXP()</function>
+ function.
+ </para>
+
<remark role="help-description-end"/>
<remark role="help-example"/>
@@ -6943,8 +6957,11 @@
<para>
If called with two parameters, this function returns the
- logarithm of <replaceable>X</replaceable> for an arbitrary
- base <replaceable>B</replaceable>.
+ logarithm of <replaceable>X</replaceable> to the base
+ <replaceable>B</replaceable>. If
+ <replaceable>X</replaceable> is less than or equal to 0, or
+ if <replaceable>B</replaceable> is less than or equal to 1,
+ then <literal>NULL</literal> is returned.
</para>
<programlisting>
@@ -6952,6 +6969,8 @@
-> 16
mysql> <userinput>SELECT LOG(10,100);</userinput>
-> 2
+mysql> <userinput>SELECT LOG(1,100);</userinput>
+ -> NULL
</programlisting>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r10592 - in trunk: it/refman-5.1 pt/refman-5.1 refman-4.1 refman-5.0 refman-5.1 refman-6.0 | jon | 25 Apr |