Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

This can cause a loss of precision for Decimal.

If we want to support other numerical types with loss in double rounding, the 
most reliable way is to represent them as fractions (x.as_integer_ratio() or 
(x.numerator, x.denominator)) and use precise integer arithmetic.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35707>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to