[Python-checkins] r86631 - python/branches/py3k/Doc/library/decimal.rst
raymond.hettinger
python-checkins at python.org
Sun Nov 21 03:47:23 CET 2010
Author: raymond.hettinger
Date: Sun Nov 21 03:47:22 2010
New Revision: 86631
Log:
Issue #7770: Note the useful range of sin/cos in the decimal module examples.
Modified:
python/branches/py3k/Doc/library/decimal.rst
Modified: python/branches/py3k/Doc/library/decimal.rst
==============================================================================
--- python/branches/py3k/Doc/library/decimal.rst (original)
+++ python/branches/py3k/Doc/library/decimal.rst Sun Nov 21 03:47:22 2010
@@ -1717,6 +1717,9 @@
def cos(x):
"""Return the cosine of x as measured in radians.
+ The taylor series approximation works best for a small value of x.
+ For larger values, first compute x = x % (2 * pi).
+
>>> print(cos(Decimal('0.5')))
0.8775825618903727161162815826
>>> print(cos(0.5))
@@ -1740,6 +1743,9 @@
def sin(x):
"""Return the sine of x as measured in radians.
+ The taylor series approximation works best for a small value of x.
+ For larger values, first compute x = x % (2 * pi).
+
>>> print(sin(Decimal('0.5')))
0.4794255386042030002732879352
>>> print(sin(0.5))
More information about the Python-checkins
mailing list