[Python-checkins] python/dist/src/Doc/lib libdecimal.tex,1.12,1.13

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Mon Jul 12 15:22:16 CEST 2004


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

Modified Files:
	libdecimal.tex 
Log Message:
Small elaboration and typo fixes.

Index: libdecimal.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** libdecimal.tex	11 Jul 2004 12:40:19 -0000	1.12
--- libdecimal.tex	12 Jul 2004 13:22:14 -0000	1.13
***************
*** 23,27 ****
  \item Decimal numbers can be represented exactly.  In contrast, numbers like
  \constant{1.1} do not have an exact representation in binary floating point.
! End users typically wound not expect \constant{1.1} to display as
  \constant{1.1000000000000001} as it does with binary floating point.
  
--- 23,27 ----
  \item Decimal numbers can be represented exactly.  In contrast, numbers like
  \constant{1.1} do not have an exact representation in binary floating point.
! End users typically would not expect \constant{1.1} to display as
  \constant{1.1000000000000001} as it does with binary floating point.
  
***************
*** 539,543 ****
  
    This is useful because constants are often given to a greater precision than
!   is needed by the application.
  \end{methoddesc} 
  
--- 539,555 ----
  
    This is useful because constants are often given to a greater precision than
!   is needed by the application.  Another benefit is that rounding immediately
!   eliminates unintended effects from digits beyond the current precision.
!   In the following example, using unrounded inputs means that adding zero
!   to a sum can change the result:
! 
!   \begin{verbatim}
!     >>> getcontext().prec = 3
!     >>> Decimal("3.4445") + Decimal("1.0023")
!     Decimal("4.45")
!     >>> Decimal("3.4445") + Decimal(0) + Decimal("1.0023")
!     Decimal("4.44")
!   \end{verbatim}
!       
  \end{methoddesc} 
  
***************
*** 613,622 ****
    Normalize reduces an operand to its simplest form.
  
!   Essentially a plus operation with all trailing zeros removed from the
!   result.
  \end{methoddesc}
    
  \begin{methoddesc}{plus}{x}
!   Minus corresponds to the unary prefix plus operator in Python.
  \end{methoddesc}
  
--- 625,636 ----
    Normalize reduces an operand to its simplest form.
  
!   Essentially a \method{plus} operation with all trailing zeros removed from
!   the result.
  \end{methoddesc}
    
  \begin{methoddesc}{plus}{x}
!   Plus corresponds to the unary prefix plus operator in Python.  This
!   operation applies the context precision and rounding, so it is
!   \emph{not} an identity operation.
  \end{methoddesc}
  



More information about the Python-checkins mailing list