diff options
author | Raymond Hettinger <python@rcn.com> | 2005-06-15 16:53:31 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-06-15 16:53:31 (GMT) |
commit | ed65c3ad7699f33006c902c05f51cdd93421b193 (patch) | |
tree | 06349dd26133e76e3bd8198809455ec26327b02b /Doc | |
parent | 32c5d424fd31a283651fddbb1be10d33184bbf5d (diff) | |
download | cpython-ed65c3ad7699f33006c902c05f51cdd93421b193.zip cpython-ed65c3ad7699f33006c902c05f51cdd93421b193.tar.gz cpython-ed65c3ad7699f33006c902c05f51cdd93421b193.tar.bz2 |
Fix nits.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libdecimal.tex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/lib/libdecimal.tex b/Doc/lib/libdecimal.tex index 7b4122a..6e46c11 100644 --- a/Doc/lib/libdecimal.tex +++ b/Doc/lib/libdecimal.tex @@ -1121,9 +1121,9 @@ def sin(x): +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Decimal FAQ \label{decimal-faq}} - Q. It is cumbersome to type \code{decimal.Decimal('1234.5')}. Is there a way to minimize typing when using the interactive interpreter? @@ -1169,7 +1169,7 @@ point. Others, like multiplication and division, change the number of decimal places and need to be followed-up with a \method{quantize()} step. -Q. There are many ways to write express the same value. The numbers +Q. There are many ways to express the same value. The numbers \constant{200}, \constant{200.000}, \constant{2E2}, and \constant{.02E+4} all have the same value at various precisions. Is there a way to transform them to a single recognizable canonical value? @@ -1203,6 +1203,7 @@ def floatToDecimal(f): mantissa *= 2.0 exponent -= 1 mantissa = int(mantissa) + oldcontext = getcontext() setcontext(Context(traps=[Inexact])) try: |