mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
Lost one line on a decimal recipe.
This commit is contained in:
parent
b3833ddecd
commit
c921dacf78
1 changed files with 1 additions and 0 deletions
|
@ -1884,6 +1884,7 @@ suggest, so we trap :const:`Inexact` to signal a need for more precision:
|
|||
ctx = Context(prec=60)
|
||||
result = ctx.divide(numerator, denominator)
|
||||
while ctx.flags[Inexact]:
|
||||
ctx.flags[Inexact] = False
|
||||
ctx.prec *= 2
|
||||
result = ctx.divide(numerator, denominator)
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue