[Python-checkins] r74617 - python/trunk/Doc/library/math.rst

georg.brandl python-checkins at python.org
Tue Sep 1 09:53:37 CEST 2009


Author: georg.brandl
Date: Tue Sep 1 09:53:37 2009
New Revision: 74617
Log:
#6765: hint that log(x, base) is not very sophisticated.
Modified:
 python/trunk/Doc/library/math.rst
Modified: python/trunk/Doc/library/math.rst
==============================================================================
--- python/trunk/Doc/library/math.rst	(original)
+++ python/trunk/Doc/library/math.rst	Tue Sep 1 09:53:37 2009
@@ -166,8 +166,10 @@
 
 .. function:: log(x[, base])
 
- Return the logarithm of *x* to the given *base*. If the *base* is not specified,
- return the natural logarithm of *x* (that is, the logarithm to base *e*).
+ With one argument, return the natural logarithm of *x* (to base *e*).
+
+ With two arguments, return the logarithm of *x* to the given *base*,
+ calculated as ``log(x)/log(base)``.
 
 .. versionchanged:: 2.3
 *base* argument added.
@@ -183,7 +185,8 @@
 
 .. function:: log10(x)
 
- Return the base-10 logarithm of *x*.
+ Return the base-10 logarithm of *x*. This is usually more accurate
+ than ``log(x, 10)``.
 
 
 .. function:: pow(x, y)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /