Home | Trees | Indices | Help |
|
---|
|
|
|||
| object | ||
|
FixedPoint Basic FixedPoint object class,... |
|
|||
|
bankersRounding(self,
dividend,
divisor,
quotient,
remainder) ... |
||
|
addHalfAndChop(self,
dividend,
divisor,
quotient,
remainder) ... |
||
| property(x, y) | ||
|
_tento(n,
cache={}) Cached computation of 10**n... |
||
|
_norm(x,
y,
isinstance=<built-in function isinstance>,
FixedPoint=<class 'orm2.util.fixedpoint.FixedPoint'>,
_tento=<function _tento at 0x77b5f0>) Return xn, yn, p s.t. |
||
|
_mkFP(n,
p,
FixedPoint=<class 'orm2.util.fixedpoint.FixedPoint'>) Make FixedPoint objext - Return a new FixedPoint object with the selected precision. |
||
| _parser(...) | ||
|
_string2exact(s) Return n, p s.t. |
||
|
_test() Unit testing framework... |
|
|||
|
__copyright__ = 'Copyright (C) Python Software Foundation'
|
||
|
__author__ = 'Tim Peters'
|
||
|
__version__ = (0, 1, 0)
|
||
|
DEFAULT_PRECISION = 2
|
|
rounding via nearest-even increment the quotient if the remainder is more than half of the divisor or the remainder is exactly half the divisor and the quotient is odd |
the equivalent of 'add half and chop' increment the quotient if the remainder is greater than half of the divisor or the remainder is exactly half the divisor and the quotient is >= 0 |
|
Cached computation of 10**n |
Return xn, yn, p s.t. p = max(x.p, y.p) x = xn / 10**p y = yn / 10**p x must be FixedPoint to begin with; if y is not FixedPoint, it inherits its precision from x. Note that this method is called a lot, so default-arg tricks are helpful. |
Make FixedPoint objext - Return a new FixedPoint object with the selected precision. |
|
Return n, p s.t. float string value == n * 10**p exactly. |
Unit testing framework |
|
__copyright__None
|
__author__None
|
__version__None
|
DEFAULT_PRECISIONNone
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Wed Feb 20 18:17:22 2008 | http://epydoc.sourceforge.net |