[Python-checkins] python/dist/src/Doc/lib libdecimal.tex, 1.24.2.4, 1.24.2.5

rhettinger@users.sourceforge.net rhettinger at users.sourceforge.net
Sun Sep 11 20:29:49 CEST 2005


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18600

Modified Files:
      Tag: release24-maint
	libdecimal.tex 
Log Message:
Add FAQ entry regarding non-expoential representation.

Index: libdecimal.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v
retrieving revision 1.24.2.4
retrieving revision 1.24.2.5
diff -u -d -r1.24.2.4 -r1.24.2.5
--- libdecimal.tex	22 Aug 2005 19:35:24 -0000	1.24.2.4
+++ libdecimal.tex	11 Sep 2005 18:29:46 -0000	1.24.2.5
@@ -32,7 +32,7 @@
 For this reason, decimal would be preferred in accounting applications which
 have strict equality invariants.
 
-\item The decimal module incorporates notion of significant places so that
+\item The decimal module incorporates a notion of significant places so that
 \samp{1.30 + 1.20} is \constant{2.50}.  The trailing zero is kept to indicate
 significance.  This is the customary presentation for monetary applications. For
 multiplication, the ``schoolbook'' approach uses all the figures in the
@@ -1141,7 +1141,7 @@
 \end{verbatim}
 
 
-Q.  In a fixed-point application to two decimal places, some inputs
+Q.  In a fixed-point application with two decimal places, some inputs
 have many places and need to be rounded.  Others are not supposed to have
 excess digits and need to be validated.  What methods should be used?
 
@@ -1189,6 +1189,15 @@
 \end{verbatim}
 
 
+Q.  Some decimal values always print with exponential notation.  Is there
+a way to get a non-exponential representation?
+
+A.  For some values, exponential notation is the only way to express
+the number of significant places in the coefficient.  For example,
+expressing \constant{5.0E+3} as \constant{5000} keeps the value
+constant but cannot show the original's two-place significance.
+
+
 Q.  Is there a way to convert a regular float to a \class{Decimal}?
 
 A.  Yes, all binary floating point numbers can be exactly expressed as a



More information about the Python-checkins mailing list