## "Fossies" - the Fresh Open Source Software Archive

### Source code changes of the file "mpmath/ctx_mp.py" betweenmpmath-1.0.0.tar.gz and mpmath-1.1.0.tar.gz

About: mpmath is a Python library for arbitrary-precision floating-point arithmetic.

ctx_mp.py  (mpmath-1.0.0):ctx_mp.py  (mpmath-1.1.0)
skipping to change at line 458 skipping to change at line 458
return PrecisionManager(ctx, lambda p: n, None, normalize_output) return PrecisionManager(ctx, lambda p: n, None, normalize_output)
def workdps(ctx, n, normalize_output=False): def workdps(ctx, n, normalize_output=False):
""" """
This function is analogous to workprec (see documentation) This function is analogous to workprec (see documentation)
but changes the decimal precision instead of the number of bits. but changes the decimal precision instead of the number of bits.
""" """
return PrecisionManager(ctx, None, lambda d: n, normalize_output) return PrecisionManager(ctx, None, lambda d: n, normalize_output)
def autoprec(ctx, f, maxprec=None, catch=(), verbose=False): def autoprec(ctx, f, maxprec=None, catch=(), verbose=False):
""" r"""
Return a wrapped copy of *f* that repeatedly evaluates *f* Return a wrapped copy of *f* that repeatedly evaluates *f*
with increasing precision until the result converges to the with increasing precision until the result converges to the
full precision used at the point of the call. full precision used at the point of the call.
This heuristically protects against rounding errors, at the cost of This heuristically protects against rounding errors, at the cost of
roughly a 2x slowdown compared to manually setting the optimal roughly a 2x slowdown compared to manually setting the optimal
precision. This method can, however, easily be fooled if the results precision. This method can, however, easily be fooled if the results
from *f* depend "discontinuously" on the precision, for instance from *f* depend "discontinuously" on the precision, for instance
if catastrophic cancellation can occur. Therefore, :func:`~mpmath.autopr ec` if catastrophic cancellation can occur. Therefore, :func:`~mpmath.autopr ec`
should be used judiciously. should be used judiciously.
End of changes. 1 change blocks.
1 lines changed or deleted 1 lines changed or added