Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e9435f24
Commit
e9435f24
authored
Jul 20, 2002
by
peter@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve
parent
8ee17f91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
5 deletions
+50
-5
Docs/manual.texi
Docs/manual.texi
+50
-5
No files found.
Docs/manual.texi
View file @
e9435f24
...
...
@@ -31867,17 +31867,58 @@ mysql> SELECT EXP(2);
mysql> SELECT EXP(-2);
-> 0.135335
@end example
@findex LOG()
@item LOG(X)
@findex LN()
@item LN(X)
Returns the natural logarithm of @code{X}:
@example
mysql> SELECT LN(2);
-> 0.693147
mysql> SELECT LN(-2);
-> NULL
@end example
This function was added in MySQL version 4.0.3.
It is synonymous with @code{LOG(X)} in MySQL.
@findex LOG()
@item LOG([B,]X)
When called with one parameter, this function returns the natural logarithm
of @code{X}:
@example
mysql> SELECT LOG(2);
-> 0.693147
mysql> SELECT LOG(-2);
-> NULL
@end example
If you want the log of a number @code{X} to some arbitrary base @code{B}, use
the formula @code{LOG(X)/LOG(B)}.
When called with two parameters, this function returns the logarithm of
@code{X} for an arbitary base @code{B}:
@example
mysql> SELECT LOG(2,65536);
-> 16.000000
mysql> SELECT LOG(1,100);
-> NULL
@end example
The arbitrary base option was added in MySQL version 4.0.3.
@code{LOG(B,X)} is equivalent to @code{LOG(X)/LOG(B)}.
@findex LOG2()
@item LOG2(X)
Returns the base-2 logarithm of @code{X}:
@example
mysql> SELECT LOG2(65536);
-> 16.000000
mysql> SELECT LOG2(-100);
-> NULL
@end example
@code{LOG2()} is useful for finding out how many bits a number would
require for storage.
This function was added in MySQL version 4.0.3.
In earlier versions, you can use @code{LOG(X)/LOG(2)} instead.
@findex LOG10()
@item LOG10(X)
...
...
@@ -49694,8 +49735,13 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
Fixed a bug that made the pager option in the mysql client non-functional.
@end itemize
Extended @code{LOG()} function to accept an optional arbitrary base parameter.
@xref{Mathematical functions}.
@item
Added @code{LOG2()} function (useful for finding out how many bits a number would require for storage).
@item
Added @code{LN()} natural logarithm function for compatibility with other databases. It is synonymous with @code{LOG(X)}.
@end itemize
Added OLAP functionality.
@c Arjen , please add the following text somewhere appropriate in the
...
...
@@ -49704,7 +49750,6 @@ text above:
-------------------------------------------------------------------------
Documentation for OLAP extension
Introduction
------------
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment